All in One SEO Pack - Version 2.9

Version Description

Download this release

Release Info

Developer hallsofmontezuma
Plugin Icon 128x128 All in One SEO Pack
Version 2.9
Comparing to
See all releases

Code changes from version 2.8 to 2.9

admin/aioseop_module_class.php CHANGED
@@ -622,7 +622,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
622
  'Python-urllib',
623
  'QueryN Metasearch',
624
  'RepoMonkey',
625
- 'SemrushBot',
626
  'SISTRIX',
627
  'sitecheck.Internetseer.com',
628
  'SiteSnagger',
@@ -673,7 +672,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
673
  'Incutio',
674
  'lmspider',
675
  'memoryBot',
676
- 'SemrushBot',
677
  'serf',
678
  'Unknown',
679
  'uptime files',
@@ -1577,8 +1575,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1577
  return false;
1578
  }
1579
 
1580
- $size = apply_filters( 'post_thumbnail_size', 'large' ); // Check if someone is using built-in WP filter.
1581
- $size = apply_filters( 'aioseop_thumbnail_size', $size );
1582
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1583
 
1584
  return $image[0];
@@ -1609,8 +1606,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1609
  );
1610
 
1611
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1612
- $size = 'large';
1613
- $size = apply_filters( 'aioseop_attachment_size', $size );
1614
  $image = wp_get_attachment_image_src( $post->ID, $size );
1615
  }
1616
 
@@ -1625,8 +1621,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1625
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1626
  foreach ( $attachments as $id => $attachment ) {
1627
  if ( ++ $i == 1 ) {
1628
- $size = 'large';
1629
- $size = apply_filters( 'aioseop_attachment_size', $size );
1630
  $image = wp_get_attachment_image_src( $id, $size );
1631
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1632
  break;
@@ -1645,6 +1640,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1645
  * @return bool
1646
  */
1647
  function get_the_image_by_scan( $p = null ) {
 
1648
 
1649
  if ( $p === null ) {
1650
  global $post;
@@ -1652,17 +1648,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1652
  $post = $p;
1653
  }
1654
 
1655
- /* Search the post's content for the <img /> tag and get its URL. */
1656
- preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', get_post_field( 'post_content', $post->ID ), $matches );
1657
-
1658
- /* If there is a match for the image, return its URL. */
1659
- if ( isset( $matches ) && ! empty( $matches[1][0] ) ) {
1660
- return $matches[1][0];
1661
  }
1662
 
1663
- return false;
1664
  }
1665
 
 
1666
  /**
1667
  * @param $default_options
1668
  * @param $options
@@ -1719,6 +1713,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1719
  * edit-tags exists only for pre 4.5 support... remove when we drop 4.5 support.
1720
  * Also, that check and others should be pulled out into their own functions.
1721
  *
 
 
1722
  * @since 2.4.14 Added term as screen base.
1723
  */
1724
  function enqueue_metabox_scripts() {
@@ -1759,22 +1755,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1759
  $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
1760
  if ( $enqueue_scripts ) {
1761
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
1762
- add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ), 20 );
1763
- add_action( 'admin_print_scripts', array( $this, 'enqueue_styles' ), 20 );
1764
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 20 );
 
1765
  }
1766
  }
1767
  }
1768
  }
1769
 
1770
- function admin_enqueue_scripts() {
1771
- wp_enqueue_media(); // WP 3.5+ Media upload.
1772
- }
1773
-
1774
  /**
1775
  * Load styles for module.
 
 
 
 
 
 
 
 
 
 
1776
  */
1777
- function enqueue_styles() {
1778
  wp_enqueue_style( 'thickbox' );
1779
  if ( ! empty( $this->pointers ) ) {
1780
  wp_enqueue_style( 'wp-pointer' );
@@ -1786,10 +1787,24 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1786
  }
1787
 
1788
  /**
1789
- * Load scripts for module, can pass data to module script.
 
 
 
 
 
 
 
1790
  * @since 2.3.12.3 Add missing wp_enqueue_media.
 
 
 
 
 
 
 
1791
  */
1792
- function enqueue_scripts() {
1793
  wp_enqueue_script( 'sack' );
1794
  wp_enqueue_script( 'jquery' );
1795
  wp_enqueue_script( 'media-upload' );
@@ -1797,16 +1812,31 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1797
  wp_enqueue_script( 'common' );
1798
  wp_enqueue_script( 'wp-lists' );
1799
  wp_enqueue_script( 'postbox' );
 
1800
  if ( ! empty( $this->pointers ) ) {
1801
- wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
 
 
 
 
1802
  }
 
1803
  global $post;
1804
  if ( ! empty( $post->ID ) ) {
1805
  wp_enqueue_media( array( 'post' => $post->ID ) );
1806
  } else {
1807
  wp_enqueue_media();
1808
  }
1809
- wp_enqueue_script( 'aioseop-module-script', AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_module.js', array(), AIOSEOP_VERSION );
 
 
 
 
 
 
 
 
 
1810
  if ( ! empty( $this->script_data ) ) {
1811
  aioseop_localize_script_data();
1812
  }
@@ -1871,8 +1901,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1871
  if ( $this->strpos( $hookname, 'load-' ) === 0 ) {
1872
  $this->pagehook = $this->substr( $hookname, 5 );
1873
  }
1874
- add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ) );
1875
- add_action( 'admin_print_styles', array( $this, 'enqueue_styles' ) );
1876
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
1877
  add_action( $this->prefix . 'settings_header', array( $this, 'display_tabs' ) );
1878
  }
@@ -2021,14 +2051,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2021
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2022
  } elseif ( $v['type'] === 'metabox' ) {
2023
  $this->setting_options( $k ); // hack -- make sure this runs anyhow, for now -- pdb
2024
- add_action( 'edit_post', array( $this, 'save_post_data' ) );
2025
- add_action( 'publish_post', array( $this, 'save_post_data' ) );
2026
- add_action( 'add_attachment', array( $this, 'save_post_data' ) );
2027
- add_action( 'edit_attachment', array( $this, 'save_post_data' ) );
2028
- add_action( 'save_post', array( $this, 'save_post_data' ) );
2029
- add_action( 'edit_page_form', array( $this, 'save_post_data' ) );
2030
  if ( isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2031
- add_action( 'admin_print_scripts', array( $this, 'enqueue_metabox_scripts' ), 5 );
2032
  if ( $this->tabbed_metaboxes ) {
2033
  add_filter( 'aioseop_add_post_metabox', array( $this, 'filter_return_metaboxes' ) );
2034
  }
@@ -2086,37 +2111,55 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2086
  }
2087
  }
2088
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2089
  /**
2090
  * Update postmeta for metabox.
2091
  *
2092
  * @param $post_id
2093
  */
2094
  function save_post_data( $post_id ) {
2095
- static $update = false;
2096
- if ( $update ) {
2097
- return;
2098
- }
2099
  if ( $this->locations !== null ) {
2100
  foreach ( $this->locations as $k => $v ) {
2101
  if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
2102
  $opts = $this->default_options( $k );
2103
  $options = array();
2104
- $update = false;
2105
  foreach ( $opts as $l => $o ) {
2106
  if ( isset( $_POST[ $l ] ) ) {
2107
  $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
2108
  $options[ $l ] = esc_attr( $options[ $l ] );
2109
- $update = true;
2110
  }
2111
  }
2112
- if ( $update ) {
2113
- $prefix = $this->get_prefix( $k );
2114
- $options = apply_filters( $prefix . 'filter_metabox_options', $options, $k, $post_id );
2115
- update_post_meta( $post_id, '_' . $prefix . $k, $options );
2116
- }
2117
  }
2118
  }
2119
  }
 
 
2120
  }
2121
 
2122
  /**
@@ -2272,6 +2315,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2272
  $buf .= "<input name='$name' type='{$options['type']}' $attr>\n";
2273
  break;
2274
  case 'textarea':
 
 
 
 
2275
  $buf .= "<textarea name='$name' $attr>$value</textarea>";
2276
  break;
2277
  case 'image':
@@ -2501,7 +2548,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2501
  $this->options[ $k ] = urlencode_deep( $this->options[ $k ] );
2502
  break;
2503
  case 'textarea':
2504
- $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
 
 
 
2505
  $this->options[ $k ] = htmlspecialchars( $this->options[ $k ], ENT_QUOTES );
2506
  break;
2507
  case 'filename':
622
  'Python-urllib',
623
  'QueryN Metasearch',
624
  'RepoMonkey',
 
625
  'SISTRIX',
626
  'sitecheck.Internetseer.com',
627
  'SiteSnagger',
672
  'Incutio',
673
  'lmspider',
674
  'memoryBot',
 
675
  'serf',
676
  'Unknown',
677
  'uptime files',
1575
  return false;
1576
  }
1577
 
1578
+ $size = apply_filters( 'aioseop_attachment_size', apply_filters( 'aioseop_thumbnail_size', apply_filters( 'post_thumbnail_size', 'full' ) ) );
 
1579
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1580
 
1581
  return $image[0];
1606
  );
1607
 
1608
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1609
+ $size = apply_filters( 'aioseop_attachment_size', apply_filters( 'aioseop_thumbnail_size', apply_filters( 'post_thumbnail_size', 'full' ) ) );
 
1610
  $image = wp_get_attachment_image_src( $post->ID, $size );
1611
  }
1612
 
1621
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1622
  foreach ( $attachments as $id => $attachment ) {
1623
  if ( ++ $i == 1 ) {
1624
+ $size = apply_filters( 'aioseop_attachment_size', apply_filters( 'aioseop_thumbnail_size', apply_filters( 'post_thumbnail_size', 'full' ) ) );
 
1625
  $image = wp_get_attachment_image_src( $id, $size );
1626
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1627
  break;
1640
  * @return bool
1641
  */
1642
  function get_the_image_by_scan( $p = null ) {
1643
+ $url = false;
1644
 
1645
  if ( $p === null ) {
1646
  global $post;
1648
  $post = $p;
1649
  }
1650
 
1651
+ $images = aiosp_common::parse_content_for_images( $post );
1652
+ if ( $images ) {
1653
+ $url = aiosp_common::get_image_src_for_url( $images[0], 'full' );
 
 
 
1654
  }
1655
 
1656
+ return $url;
1657
  }
1658
 
1659
+
1660
  /**
1661
  * @param $default_options
1662
  * @param $options
1713
  * edit-tags exists only for pre 4.5 support... remove when we drop 4.5 support.
1714
  * Also, that check and others should be pulled out into their own functions.
1715
  *
1716
+ * @todo is it possible to migrate this to \All_in_One_SEO_Pack_Module::add_page_hooks? Or refactor? Both function about the same.
1717
+ *
1718
  * @since 2.4.14 Added term as screen base.
1719
  */
1720
  function enqueue_metabox_scripts() {
1755
  $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
1756
  if ( $enqueue_scripts ) {
1757
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
 
 
1758
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 20 );
1759
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ), 20 );
1760
  }
1761
  }
1762
  }
1763
  }
1764
 
 
 
 
 
1765
  /**
1766
  * Load styles for module.
1767
+ *
1768
+ * Add hook in \All_in_One_SEO_Pack_Module::enqueue_metabox_scripts - Bails adding hook if not on target valid screen.
1769
+ * Add hook in \All_in_One_SEO_Pack_Module::add_page_hooks - Function itself is hooked based on the screen_id/page.
1770
+ *
1771
+ * @since 2.9
1772
+ *
1773
+ * @see 'admin_enqueue_scripts' hook
1774
+ * @link https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
1775
+ *
1776
+ * @param string $hook_suffix
1777
  */
1778
+ function admin_enqueue_styles( $hook_suffix ) {
1779
  wp_enqueue_style( 'thickbox' );
1780
  if ( ! empty( $this->pointers ) ) {
1781
  wp_enqueue_style( 'wp-pointer' );
1787
  }
1788
 
1789
  /**
1790
+ * Admin Enqueue Scripts
1791
+ *
1792
+ * Hook function to enqueue scripts and localize data to scripts.
1793
+ *
1794
+ * Add hook in \All_in_One_SEO_Pack_Module::enqueue_metabox_scripts - Bails adding hook if not on target valid screen.
1795
+ * Add hook in \All_in_One_SEO_Pack_Module::add_page_hooks - Function itself is hooked based on the screen_id/page.
1796
+ *
1797
+ * @since ?
1798
  * @since 2.3.12.3 Add missing wp_enqueue_media.
1799
+ * @since 2.9 Switch to admin_enqueue_scripts; both the hook and function name.
1800
+ *
1801
+ * @see 'admin_enqueue_scripts' hook
1802
+ * @link https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
1803
+ * @global WP_Post $post Used to set the post ID in wp_enqueue_media().
1804
+ *
1805
+ * @param string $hook_suffix
1806
  */
1807
+ public function admin_enqueue_scripts( $hook_suffix ) {
1808
  wp_enqueue_script( 'sack' );
1809
  wp_enqueue_script( 'jquery' );
1810
  wp_enqueue_script( 'media-upload' );
1812
  wp_enqueue_script( 'common' );
1813
  wp_enqueue_script( 'wp-lists' );
1814
  wp_enqueue_script( 'postbox' );
1815
+
1816
  if ( ! empty( $this->pointers ) ) {
1817
+ wp_enqueue_script(
1818
+ 'wp-pointer',
1819
+ false,
1820
+ array( 'jquery' )
1821
+ );
1822
  }
1823
+
1824
  global $post;
1825
  if ( ! empty( $post->ID ) ) {
1826
  wp_enqueue_media( array( 'post' => $post->ID ) );
1827
  } else {
1828
  wp_enqueue_media();
1829
  }
1830
+
1831
+ // AIOSEOP Script enqueue.
1832
+ wp_enqueue_script(
1833
+ 'aioseop-module-script',
1834
+ AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_module.js',
1835
+ array(),
1836
+ AIOSEOP_VERSION
1837
+ );
1838
+
1839
+ // Localize aiosp_data in JS.
1840
  if ( ! empty( $this->script_data ) ) {
1841
  aioseop_localize_script_data();
1842
  }
1901
  if ( $this->strpos( $hookname, 'load-' ) === 0 ) {
1902
  $this->pagehook = $this->substr( $hookname, 5 );
1903
  }
1904
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
1905
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ) );
1906
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
1907
  add_action( $this->prefix . 'settings_header', array( $this, 'display_tabs' ) );
1908
  }
2051
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2052
  } elseif ( $v['type'] === 'metabox' ) {
2053
  $this->setting_options( $k ); // hack -- make sure this runs anyhow, for now -- pdb
2054
+ $this->toggle_save_post_hooks( true );
 
 
 
 
 
2055
  if ( isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2056
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_metabox_scripts' ), 5 );
2057
  if ( $this->tabbed_metaboxes ) {
2058
  add_filter( 'aioseop_add_post_metabox', array( $this, 'filter_return_metaboxes' ) );
2059
  }
2111
  }
2112
  }
2113
 
2114
+ /**
2115
+ * Adds or removes hooks that could be called while editing a post.
2116
+ *
2117
+ * TODO: Review if all these hooks are really required (save_post should be enough vs. edit_post and publish_post).
2118
+ */
2119
+ private function toggle_save_post_hooks( $add ) {
2120
+ if ( $add ) {
2121
+ add_action( 'edit_post', array( $this, 'save_post_data' ) );
2122
+ add_action( 'publish_post', array( $this, 'save_post_data' ) );
2123
+ add_action( 'add_attachment', array( $this, 'save_post_data' ) );
2124
+ add_action( 'edit_attachment', array( $this, 'save_post_data' ) );
2125
+ add_action( 'save_post', array( $this, 'save_post_data' ) );
2126
+ add_action( 'edit_page_form', array( $this, 'save_post_data' ) );
2127
+ } else {
2128
+ remove_action( 'edit_post', array( $this, 'save_post_data' ) );
2129
+ remove_action( 'publish_post', array( $this, 'save_post_data' ) );
2130
+ remove_action( 'add_attachment', array( $this, 'save_post_data' ) );
2131
+ remove_action( 'edit_attachment', array( $this, 'save_post_data' ) );
2132
+ remove_action( 'save_post', array( $this, 'save_post_data' ) );
2133
+ remove_action( 'edit_page_form', array( $this, 'save_post_data' ) );
2134
+ }
2135
+ }
2136
+
2137
  /**
2138
  * Update postmeta for metabox.
2139
  *
2140
  * @param $post_id
2141
  */
2142
  function save_post_data( $post_id ) {
2143
+ $this->toggle_save_post_hooks( false );
 
 
 
2144
  if ( $this->locations !== null ) {
2145
  foreach ( $this->locations as $k => $v ) {
2146
  if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
2147
  $opts = $this->default_options( $k );
2148
  $options = array();
 
2149
  foreach ( $opts as $l => $o ) {
2150
  if ( isset( $_POST[ $l ] ) ) {
2151
  $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
2152
  $options[ $l ] = esc_attr( $options[ $l ] );
 
2153
  }
2154
  }
2155
+ $prefix = $this->get_prefix( $k );
2156
+ $options = apply_filters( $prefix . 'filter_metabox_options', $options, $k, $post_id );
2157
+ update_post_meta( $post_id, '_' . $prefix . $k, $options );
 
 
2158
  }
2159
  }
2160
  }
2161
+
2162
+ $this->toggle_save_post_hooks( true );
2163
  }
2164
 
2165
  /**
2315
  $buf .= "<input name='$name' type='{$options['type']}' $attr>\n";
2316
  break;
2317
  case 'textarea':
2318
+ // #1363: prevent characters like ampersand in title and description (in social meta module) from getting changed to &amp;
2319
+ if ( in_array( $name, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) {
2320
+ $value = htmlspecialchars_decode( $value, ENT_QUOTES );
2321
+ }
2322
  $buf .= "<textarea name='$name' $attr>$value</textarea>";
2323
  break;
2324
  case 'image':
2548
  $this->options[ $k ] = urlencode_deep( $this->options[ $k ] );
2549
  break;
2550
  case 'textarea':
2551
+ // #1363: prevent characters like ampersand in title and description (in social meta module) from getting changed to &amp;
2552
+ if ( ! ( 'opengraph' === $location && in_array( $k, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) ) {
2553
+ $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
2554
+ }
2555
  $this->options[ $k ] = htmlspecialchars( $this->options[ $k ], ENT_QUOTES );
2556
  break;
2557
  case 'filename':
admin/display/credits-content.php CHANGED
@@ -55,13 +55,17 @@
55
  Alejandro Mostajo</a>
56
  </li>
57
  <li class="wp-person" id="rozroz">
58
- <a class="web" target="_blank" href="https://profiles.wordpress.org/rozroz/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/5a4758faa5ba6fc1322bdfb0f6ebcf56c?s=60">
59
  Ashish Ravi</a>
60
  </li>
61
  <li class="wp-person" id="rozroz">
62
  <a class="web" target="_blank" href="https://profiles.wordpress.org/yummy-wp/"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/22232968?v=3&s=460">
63
  Stanislav Samoilenko</a>
64
  </li>
 
 
 
 
65
  <li class="wp-person" id="EkoJR">
66
  <a class="web" target="_blank" href="https://profiles.wordpress.org/EkoJR/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/bb4c78fe944b58bd5f127d836500c30a?s=200&d=mm&r=g">
67
  Stanislav Samoilenko</a>
55
  Alejandro Mostajo</a>
56
  </li>
57
  <li class="wp-person" id="rozroz">
58
+ <a class="web" target="_blank" href="https://github.com/contactashish13"><img alt="" class="gravatar" src="https://avatars2.githubusercontent.com/u/12953439?s=60">
59
  Ashish Ravi</a>
60
  </li>
61
  <li class="wp-person" id="rozroz">
62
  <a class="web" target="_blank" href="https://profiles.wordpress.org/yummy-wp/"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/22232968?v=3&s=460">
63
  Stanislav Samoilenko</a>
64
  </li>
65
+ <li class="wp-person" id="shoheitanaka">
66
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/shoheitanaka"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/677e512c803c40c0180d4514f876a21f?s=200&d=mm&r=g">
67
+ Shohei Tanaka</a>
68
+ </li>
69
  <li class="wp-person" id="EkoJR">
70
  <a class="web" target="_blank" href="https://profiles.wordpress.org/EkoJR/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/bb4c78fe944b58bd5f127d836500c30a?s=200&d=mm&r=g">
71
  Stanislav Samoilenko</a>
aioseop_class.php CHANGED
@@ -117,14 +117,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
117
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
118
  __( '%post_date% - The date the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
119
  __( '%post_year% - The year the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
120
- __( '%post_month% - The month the page was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
121
  'post_title_format' =>
122
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
123
- . '<li><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
125
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
126
  __( '%category_title% - The (main) category of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
127
- __( '%1$category% - Alias for %2$category_title%', 'all-in-one-seo-pack' ) . '</li><li>' .
128
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
129
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
130
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -132,7 +132,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
132
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
133
  __( '%post_date% - The date the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
134
  __( '%post_year% - The year the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
135
- __( '%post_month% - The month the post was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
136
  'category_title_format' =>
137
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
138
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -176,13 +176,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
176
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
177
  __( '%post_date% - The date the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
178
  __( '%post_year% - The year the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
179
- __( '%post_month% - The month the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
180
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
181
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
182
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
183
  __( '%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all-in-one-seo-pack' ) . '</li><li>' .
184
  __( '%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all-in-one-seo-pack' ) . '</li><li>' .
185
- __( '%404_title% - Additional 404 title input"', 'all-in-one-seo-pack' ) . '</li></ul>',
186
  'paged_format' => __( 'This string gets appended/prepended to titles of paged index pages (like home or archive pages).', 'all-in-one-seo-pack' )
187
  . __( 'The following macros are supported:', 'all-in-one-seo-pack' )
188
  . '<ul><li>' . __( '%page% - The page number', 'all-in-one-seo-pack' ) . '</li></ul>',
@@ -1571,6 +1571,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1571
 
1572
  /*** Used to filter wp_title(), get our title. ***/
1573
  function wp_title() {
 
 
 
 
1574
  global $aioseop_options;
1575
  $title = false;
1576
  $post = $this->get_queried_object();
@@ -1728,7 +1732,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1728
  $title = apply_filters( 'aioseop_title_page', $title );
1729
 
1730
  return $title;
1731
- } elseif ( is_single() ) {
1732
  // We're not in the loop :(.
1733
  if ( null === $post ) {
1734
  return false;
@@ -2478,7 +2482,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2478
  }
2479
  } elseif ( is_front_page() ) {
2480
  $description = $this->get_aioseop_description( $post );
2481
- } elseif ( is_single() || is_page() || is_attachment() || is_home() || $this->is_static_posts_page() ) {
2482
  $description = $this->get_aioseop_description( $post );
2483
  } elseif ( ( is_category() || is_tag() || is_tax() ) && $this->show_page_description() ) {
2484
  if ( ! empty( $opts ) && AIOSEOPPRO ) {
@@ -2533,6 +2537,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2533
  * @return mixed
2534
  */
2535
  function get_page_number() {
 
 
 
 
2536
  $page = get_query_var( 'page' );
2537
  if ( empty( $page ) ) {
2538
  $page = get_query_var( 'paged' );
@@ -2617,7 +2625,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2617
  */
2618
  function trim_text_without_filters_full_length( $text ) {
2619
  $text = str_replace( ']]>', ']]&gt;', $text );
2620
- $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
2621
  $text = wp_strip_all_tags( $text );
2622
 
2623
  return trim( $text );
@@ -2633,7 +2640,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2633
  */
2634
  function trim_excerpt_without_filters( $text, $max = 0 ) {
2635
  $text = str_replace( ']]>', ']]&gt;', $text );
2636
- $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text );
2637
  $text = wp_strip_all_tags( $text );
2638
  // Treat other common word-break characters like a space.
2639
  $text2 = preg_replace( '/[,._\-=+&!\?;:*]/s', ' ', $text );
@@ -2680,6 +2686,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2680
  return false;
2681
  }
2682
  $link = '';
 
 
 
2683
  $haspost = false;
2684
  if ( ! empty( $query->posts ) ) {
2685
  $haspost = count( $query->posts ) > 0;
@@ -2700,6 +2709,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2700
  default:
2701
  return false;
2702
  }
 
2703
  } elseif ( $query->is_home && ( get_option( 'show_on_front' ) == 'page' ) && ( $pageid = get_option( 'page_for_posts' ) ) ) {
2704
  $link = aioseop_get_permalink( $pageid );
2705
  } elseif ( is_front_page() || ( $query->is_home && ( get_option( 'show_on_front' ) != 'page' || ! get_option( 'page_for_posts' ) ) ) ) {
@@ -2725,18 +2735,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2725
  $link = get_tag_link( $tag->term_id );
2726
  }
2727
  } elseif ( $query->is_day && $haspost ) {
2728
- $link = get_day_link(
2729
- get_query_var( 'year' ),
2730
- get_query_var( 'monthnum' ),
2731
- get_query_var( 'day' )
2732
- );
2733
  } elseif ( $query->is_month && $haspost ) {
2734
- $link = get_month_link(
2735
- get_query_var( 'year' ),
2736
- get_query_var( 'monthnum' )
2737
- );
2738
  } elseif ( $query->is_year && $haspost ) {
2739
  $link = get_year_link( get_query_var( 'year' ) );
 
2740
  } elseif ( $query->is_tax && $haspost ) {
2741
  $taxonomy = get_query_var( 'taxonomy' );
2742
  $term = get_query_var( 'term' );
@@ -2758,6 +2764,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2758
  $link = $this->get_paged( $link );
2759
  }
2760
 
 
 
 
 
 
 
 
2761
  return $link;
2762
  }
2763
 
@@ -2775,9 +2788,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2775
  }
2776
  if ( ! empty( $page ) && $page > 1 ) {
2777
  if ( $page == get_query_var( 'page' ) ) {
2778
- $link = trailingslashit( $link ) . "$page";
 
 
 
 
 
2779
  } else {
2780
- $link = trailingslashit( $link ) . trailingslashit( $page_name ) . $page;
 
 
 
 
 
2781
  }
2782
  $link = user_trailingslashit( $link, 'paged' );
2783
  }
@@ -2822,7 +2845,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2822
  return null;
2823
  }
2824
  // If we are on synthetic pages.
2825
- if ( ! is_home() && ! is_page() && ! is_single() && ! $this->is_static_front_page() && ! $this->is_static_posts_page() && ! is_archive() && ! is_post_type_archive() && ! is_category() && ! is_tag() && ! is_tax() ) {
2826
  return null;
2827
  }
2828
  $keywords = array();
@@ -3278,22 +3301,39 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3278
  add_filter( "{$this->prefix}submit_options", array( $this, 'filter_submit' ) );
3279
  }
3280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3281
  /**
3282
  * Admin Enqueue Scripts
3283
  *
3284
  * @since 2.5.0
 
3285
  *
3286
  * @uses All_in_One_SEO_Pack_Module::admin_enqueue_scripts();
 
 
3287
  */
3288
- function admin_enqueue_scripts() {
3289
- wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css', array(), AIOSEOP_VERSION );
3290
- parent::admin_enqueue_scripts();
3291
- }
3292
-
3293
- function enqueue_scripts() {
3294
  add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 );
3295
  add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 );
3296
- parent::enqueue_scripts();
 
3297
  }
3298
 
3299
  /**
@@ -3543,6 +3583,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3543
  return false;
3544
  }
3545
  } else {
 
3546
  if ( is_singular() && ! in_array( $post_type, $wp_post_types ) && ! is_front_page() ) {
3547
  return false;
3548
  }
@@ -3676,7 +3717,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3676
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
3677
 
3678
  add_action( 'admin_head', array( $this, 'add_page_icon' ) );
3679
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
3680
  add_action( 'admin_init', 'aioseop_addmycolumns', 1 );
3681
  add_action( 'admin_init', 'aioseop_handle_ignore_notice' );
3682
  if ( AIOSEOPPRO ) {
@@ -3783,6 +3824,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3783
  * @since 2.3.11.5
3784
  */
3785
  function amp_head() {
 
 
 
 
3786
  $post = $this->get_queried_object();
3787
  $description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
3788
 
@@ -3791,6 +3836,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3791
  return;
3792
  }
3793
 
 
 
3794
  // Handle the description format.
3795
  if ( isset( $description ) && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
3796
  $description = $this->trim_description( $description );
@@ -3811,11 +3858,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3811
  }
3812
  }
3813
 
 
 
 
 
 
 
 
 
3814
  /**
3815
  * @since 2.3.14 #932 Removes filter "aioseop_description".
3816
  */
3817
  function wp_head() {
3818
-
3819
  // Check if we're in the main query to support bad themes and plugins.
3820
  global $wp_query;
3821
  $old_wp_query = null;
@@ -3825,6 +3879,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3825
  }
3826
 
3827
  if ( ! $this->is_page_included() ) {
 
 
 
 
 
 
 
3828
  if ( ! empty( $old_wp_query ) ) {
3829
  // Change the query back after we've finished.
3830
  $GLOBALS['wp_query'] = $old_wp_query;
@@ -3833,10 +3894,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3833
 
3834
  return;
3835
  }
 
 
 
 
 
3836
  $opts = $this->meta_opts;
3837
  global $aioseop_update_checker, $wp_query, $aioseop_options, $posts;
3838
  static $aioseop_dup_counter = 0;
3839
  $aioseop_dup_counter ++;
 
3840
  if ( ! defined( 'AIOSEOP_UNIT_TESTING' ) && $aioseop_dup_counter > 1 ) {
3841
  echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %1$s filter. Called %2$s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
3842
  if ( ! empty( $old_wp_query ) ) {
@@ -3935,7 +4002,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3935
  ) as $k => $v
3936
  ) {
3937
  if ( ! empty( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) {
3938
- $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) . '" />' . "\n";
3939
  }
3940
  }
3941
 
@@ -4011,6 +4078,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4011
  $url = '';
4012
  if ( ! empty( $aioseop_options['aiosp_customize_canonical_links'] ) && ! empty( $opts['aiosp_custom_link'] ) && ! is_home() ) {
4013
  $url = $opts['aiosp_custom_link'];
 
 
 
4014
  }
4015
  if ( empty( $url ) ) {
4016
  $url = $this->aiosp_mrt_get_url( $wp_query, $show_page );
@@ -4183,7 +4253,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4183
  $nofollow = 'nofollow';
4184
  }
4185
  // #322: duplicating this code so that we don't step on some other entities' toes.
4186
- } elseif ( is_single() || is_page() || $this->is_static_posts_page() || is_attachment() || is_category() || is_tag() || is_tax() || ( $page > 1 ) ) {
4187
  $post_type = get_post_type();
4188
  if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] )
4189
  || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] )
@@ -4215,8 +4285,28 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4215
  }
4216
 
4217
  /**
4218
- * Determine if post is password protected.
4219
- * @since 2.3.11.5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4220
  * @return bool
4221
  */
4222
  function is_password_protected() {
@@ -4393,6 +4483,8 @@ EOF;
4393
  if ( $numpages > 1 ) {
4394
  $multipage = 1;
4395
  }
 
 
4396
  }
4397
  if ( ! empty( $page ) ) {
4398
  if ( $page > 1 ) {
@@ -4784,6 +4876,7 @@ EOF;
4784
  }
4785
 
4786
  function admin_menu() {
 
4787
  $file = plugin_basename( __FILE__ );
4788
  $menu_name = __( 'All in One SEO', 'all-in-one-seo-pack' );
4789
 
@@ -4958,6 +5051,32 @@ EOF;
4958
  }
4959
  }
4960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4961
  /**
4962
  * @param $menu_order
4963
  *
117
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
118
  __( '%post_date% - The date the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
119
  __( '%post_year% - The year the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
120
+ __( '%post_month% - The month the page was published (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
121
  'post_title_format' =>
122
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
123
+ . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
125
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
126
  __( '%category_title% - The (main) category of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
127
+ __( '%category% - Alias for %category_title%', 'all-in-one-seo-pack' ) . '</li><li>' .
128
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
129
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
130
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
132
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
133
  __( '%post_date% - The date the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
134
  __( '%post_year% - The year the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
135
+ __( '%post_month% - The month the post was published (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
136
  'category_title_format' =>
137
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
138
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
176
  __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
177
  __( '%post_date% - The date the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
178
  __( '%post_year% - The year the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
179
+ __( '%post_month% - The month the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
180
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
181
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
182
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
183
  __( '%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all-in-one-seo-pack' ) . '</li><li>' .
184
  __( '%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all-in-one-seo-pack' ) . '</li><li>' .
185
+ __( '%404_title% - Additional 404 title input', 'all-in-one-seo-pack' ) . '</li></ul>',
186
  'paged_format' => __( 'This string gets appended/prepended to titles of paged index pages (like home or archive pages).', 'all-in-one-seo-pack' )
187
  . __( 'The following macros are supported:', 'all-in-one-seo-pack' )
188
  . '<ul><li>' . __( '%page% - The page number', 'all-in-one-seo-pack' ) . '</li></ul>',
1571
 
1572
  /*** Used to filter wp_title(), get our title. ***/
1573
  function wp_title() {
1574
+ if ( ! $this->is_seo_enabled_for_cpt() ) {
1575
+ return;
1576
+ }
1577
+
1578
  global $aioseop_options;
1579
  $title = false;
1580
  $post = $this->get_queried_object();
1732
  $title = apply_filters( 'aioseop_title_page', $title );
1733
 
1734
  return $title;
1735
+ } elseif ( is_single() || $this->check_singular() ) {
1736
  // We're not in the loop :(.
1737
  if ( null === $post ) {
1738
  return false;
2482
  }
2483
  } elseif ( is_front_page() ) {
2484
  $description = $this->get_aioseop_description( $post );
2485
+ } elseif ( is_single() || is_page() || is_attachment() || is_home() || $this->is_static_posts_page() || $this->check_singular() ) {
2486
  $description = $this->get_aioseop_description( $post );
2487
  } elseif ( ( is_category() || is_tag() || is_tax() ) && $this->show_page_description() ) {
2488
  if ( ! empty( $opts ) && AIOSEOPPRO ) {
2537
  * @return mixed
2538
  */
2539
  function get_page_number() {
2540
+ global $post;
2541
+ if ( is_singular() && false === strpos( $post->post_content, '<!--nextpage-->' ) ) {
2542
+ return null;
2543
+ }
2544
  $page = get_query_var( 'page' );
2545
  if ( empty( $page ) ) {
2546
  $page = get_query_var( 'paged' );
2625
  */
2626
  function trim_text_without_filters_full_length( $text ) {
2627
  $text = str_replace( ']]>', ']]&gt;', $text );
 
2628
  $text = wp_strip_all_tags( $text );
2629
 
2630
  return trim( $text );
2640
  */
2641
  function trim_excerpt_without_filters( $text, $max = 0 ) {
2642
  $text = str_replace( ']]>', ']]&gt;', $text );
 
2643
  $text = wp_strip_all_tags( $text );
2644
  // Treat other common word-break characters like a space.
2645
  $text2 = preg_replace( '/[,._\-=+&!\?;:*]/s', ' ', $text );
2686
  return false;
2687
  }
2688
  $link = '';
2689
+ // this boolean will determine if any additional parameters will be added to the final link or not.
2690
+ // this is especially useful in issues such as #491.
2691
+ $add_query_params = false;
2692
  $haspost = false;
2693
  if ( ! empty( $query->posts ) ) {
2694
  $haspost = count( $query->posts ) > 0;
2709
  default:
2710
  return false;
2711
  }
2712
+ $add_query_params = true;
2713
  } elseif ( $query->is_home && ( get_option( 'show_on_front' ) == 'page' ) && ( $pageid = get_option( 'page_for_posts' ) ) ) {
2714
  $link = aioseop_get_permalink( $pageid );
2715
  } elseif ( is_front_page() || ( $query->is_home && ( get_option( 'show_on_front' ) != 'page' || ! get_option( 'page_for_posts' ) ) ) ) {
2735
  $link = get_tag_link( $tag->term_id );
2736
  }
2737
  } elseif ( $query->is_day && $haspost ) {
2738
+ $link = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
2739
+ $add_query_params = true;
 
 
 
2740
  } elseif ( $query->is_month && $haspost ) {
2741
+ $link = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
2742
+ $add_query_params = true;
 
 
2743
  } elseif ( $query->is_year && $haspost ) {
2744
  $link = get_year_link( get_query_var( 'year' ) );
2745
+ $add_query_params = true;
2746
  } elseif ( $query->is_tax && $haspost ) {
2747
  $taxonomy = get_query_var( 'taxonomy' );
2748
  $term = get_query_var( 'term' );
2764
  $link = $this->get_paged( $link );
2765
  }
2766
 
2767
+ if ( $add_query_params ) {
2768
+ $post_type = get_query_var( 'post_type' );
2769
+ if ( ! empty( $post_type ) ) {
2770
+ $link = add_query_arg( 'post_type', $post_type, $link );
2771
+ }
2772
+ }
2773
+
2774
  return $link;
2775
  }
2776
 
2788
  }
2789
  if ( ! empty( $page ) && $page > 1 ) {
2790
  if ( $page == get_query_var( 'page' ) ) {
2791
+ if ( get_query_var( 'p' ) ) {
2792
+ // non-pretty urls.
2793
+ $link = add_query_arg( 'page', $page, $link );
2794
+ } else {
2795
+ $link = trailingslashit( $link ) . "$page";
2796
+ }
2797
  } else {
2798
+ if ( get_query_var( 'p' ) ) {
2799
+ // non-pretty urls.
2800
+ $link = add_query_arg( 'page', $page, trailingslashit( $link ) . $page_name );
2801
+ } else {
2802
+ $link = trailingslashit( $link ) . trailingslashit( $page_name ) . $page;
2803
+ }
2804
  }
2805
  $link = user_trailingslashit( $link, 'paged' );
2806
  }
2845
  return null;
2846
  }
2847
  // If we are on synthetic pages.
2848
+ if ( ! is_home() && ! is_page() && ! is_single() && ! $this->is_static_front_page() && ! $this->is_static_posts_page() && ! is_archive() && ! is_post_type_archive() && ! is_category() && ! is_tag() && ! is_tax() && ! $this->check_singular() ) {
2849
  return null;
2850
  }
2851
  $keywords = array();
3301
  add_filter( "{$this->prefix}submit_options", array( $this, 'filter_submit' ) );
3302
  }
3303
 
3304
+ /**
3305
+ * Admin Enqueue Styles All (Screens)
3306
+ *
3307
+ * Enqueue style on all admin screens.
3308
+ *
3309
+ * @since 2.9
3310
+ *
3311
+ * @param $hook_suffix
3312
+ */
3313
+ public function admin_enqueue_styles_all( $hook_suffix ) {
3314
+ wp_enqueue_style(
3315
+ 'aiosp_admin_style',
3316
+ AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css',
3317
+ array(),
3318
+ AIOSEOP_VERSION
3319
+ );
3320
+ }
3321
+
3322
  /**
3323
  * Admin Enqueue Scripts
3324
  *
3325
  * @since 2.5.0
3326
+ * @since 2.9 Refactor code to `admin_enqueue_scripts` hook, and move enqueue stylesheet to \All_in_One_SEO_Pack::admin_enqueue_styles_all().
3327
  *
3328
  * @uses All_in_One_SEO_Pack_Module::admin_enqueue_scripts();
3329
+ *
3330
+ * @param string $hook_suffix
3331
  */
3332
+ public function admin_enqueue_scripts( $hook_suffix ) {
 
 
 
 
 
3333
  add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 );
3334
  add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 );
3335
+
3336
+ parent::admin_enqueue_scripts( $hook_suffix );
3337
  }
3338
 
3339
  /**
3583
  return false;
3584
  }
3585
  } else {
3586
+
3587
  if ( is_singular() && ! in_array( $post_type, $wp_post_types ) && ! is_front_page() ) {
3588
  return false;
3589
  }
3717
  add_action( 'admin_menu', array( $this, 'admin_menu' ) );
3718
 
3719
  add_action( 'admin_head', array( $this, 'add_page_icon' ) );
3720
+ add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles_all' ) );
3721
  add_action( 'admin_init', 'aioseop_addmycolumns', 1 );
3722
  add_action( 'admin_init', 'aioseop_handle_ignore_notice' );
3723
  if ( AIOSEOPPRO ) {
3824
  * @since 2.3.11.5
3825
  */
3826
  function amp_head() {
3827
+ if ( ! $this->is_seo_enabled_for_cpt() ) {
3828
+ return;
3829
+ }
3830
+
3831
  $post = $this->get_queried_object();
3832
  $description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
3833
 
3836
  return;
3837
  }
3838
 
3839
+ global $aioseop_options;
3840
+
3841
  // Handle the description format.
3842
  if ( isset( $description ) && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
3843
  $description = $this->trim_description( $description );
3858
  }
3859
  }
3860
 
3861
+ /**
3862
+ * Checks whether the current CPT should show the SEO tags.
3863
+ */
3864
+ private function is_seo_enabled_for_cpt() {
3865
+ global $aioseop_options;
3866
+ return 'on' === $aioseop_options['aiosp_enablecpost'] && in_array( get_post_type(), $aioseop_options['aiosp_cpostactive'], true );
3867
+ }
3868
+
3869
  /**
3870
  * @since 2.3.14 #932 Removes filter "aioseop_description".
3871
  */
3872
  function wp_head() {
 
3873
  // Check if we're in the main query to support bad themes and plugins.
3874
  global $wp_query;
3875
  $old_wp_query = null;
3879
  }
3880
 
3881
  if ( ! $this->is_page_included() ) {
3882
+ // Handle noindex, nofollow - robots meta.
3883
+ $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
3884
+ if ( ! empty( $robots_meta ) ) {
3885
+ // Should plugin & version details be added here as well?
3886
+ echo '<meta name="robots" content="' . esc_attr( $robots_meta ) . '" />' . "\n";
3887
+ }
3888
+
3889
  if ( ! empty( $old_wp_query ) ) {
3890
  // Change the query back after we've finished.
3891
  $GLOBALS['wp_query'] = $old_wp_query;
3894
 
3895
  return;
3896
  }
3897
+
3898
+ if ( ! $this->is_seo_enabled_for_cpt() ) {
3899
+ return;
3900
+ }
3901
+
3902
  $opts = $this->meta_opts;
3903
  global $aioseop_update_checker, $wp_query, $aioseop_options, $posts;
3904
  static $aioseop_dup_counter = 0;
3905
  $aioseop_dup_counter ++;
3906
+
3907
  if ( ! defined( 'AIOSEOP_UNIT_TESTING' ) && $aioseop_dup_counter > 1 ) {
3908
  echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %1$s filter. Called %2$s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
3909
  if ( ! empty( $old_wp_query ) ) {
4002
  ) as $k => $v
4003
  ) {
4004
  if ( ! empty( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) {
4005
+ $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options["aiosp_{$k}_verify"] ) ) . '" />' . "\n";
4006
  }
4007
  }
4008
 
4078
  $url = '';
4079
  if ( ! empty( $aioseop_options['aiosp_customize_canonical_links'] ) && ! empty( $opts['aiosp_custom_link'] ) && ! is_home() ) {
4080
  $url = $opts['aiosp_custom_link'];
4081
+ if ( apply_filters( 'aioseop_canonical_url_pagination', $show_page ) ) {
4082
+ $url = $this->get_paged( $url );
4083
+ }
4084
  }
4085
  if ( empty( $url ) ) {
4086
  $url = $this->aiosp_mrt_get_url( $wp_query, $show_page );
4253
  $nofollow = 'nofollow';
4254
  }
4255
  // #322: duplicating this code so that we don't step on some other entities' toes.
4256
+ } elseif ( is_single() || is_page() || $this->is_static_posts_page() || is_attachment() || is_category() || is_tag() || is_tax() || ( $page > 1 ) || $this->check_singular() ) {
4257
  $post_type = get_post_type();
4258
  if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] )
4259
  || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] )
4285
  }
4286
 
4287
  /**
4288
+ * Determine if the post is 'like' singular. In some specific instances, such as when the Reply post type of bbpress is loaded in its own page,
4289
+ * it reflects as singular intead of single
4290
+ *
4291
+ * @since 2.4.2
4292
+ *
4293
+ * @return bool
4294
+ */
4295
+ private function check_singular() {
4296
+ global $wp_query, $post;
4297
+ $is_singular = false;
4298
+ if ( is_singular() ) {
4299
+ // #1297 - support for bbpress 'reply' post type.
4300
+ if ( $post && 'reply' === $post->post_type ) {
4301
+ $is_singular = true;
4302
+ }
4303
+ }
4304
+ return $is_singular;
4305
+ }
4306
+
4307
+ /**
4308
+ * Determine if post is password protected.
4309
+ * @since 2.3.11.5
4310
  * @return bool
4311
  */
4312
  function is_password_protected() {
4483
  if ( $numpages > 1 ) {
4484
  $multipage = 1;
4485
  }
4486
+ } else {
4487
+ $page = null;
4488
  }
4489
  if ( ! empty( $page ) ) {
4490
  if ( $page > 1 ) {
4876
  }
4877
 
4878
  function admin_menu() {
4879
+ $this->check_recently_activated_modules( $_POST );
4880
  $file = plugin_basename( __FILE__ );
4881
  $menu_name = __( 'All in One SEO', 'all-in-one-seo-pack' );
4882
 
5051
  }
5052
  }
5053
 
5054
+ /**
5055
+ * Checks which module(s) have been (de)activated just now and fires a corresponding action.
5056
+ *
5057
+ * @param array $post Duplicate of $_POST.
5058
+ */
5059
+ private function check_recently_activated_modules( $post ) {
5060
+ global $aioseop_options;
5061
+ $modules = array();
5062
+ if ( array_key_exists( 'modules', $aioseop_options ) && array_key_exists( 'aiosp_feature_manager_options', $aioseop_options['modules'] ) ) {
5063
+ $modules = array_keys( $aioseop_options['modules']['aiosp_feature_manager_options'] );
5064
+ }
5065
+
5066
+ if ( $modules ) {
5067
+ foreach ( $modules as $module ) {
5068
+ $name = str_replace( 'aiosp_feature_manager_enable_', '', $module );
5069
+ if ( empty( $aioseop_options['modules']['aiosp_feature_manager_options'][ $module ] ) && ! empty( $post[ $module ] ) ) {
5070
+ // this module was activated.
5071
+ do_action( $this->prefix . 'activate_' . $name );
5072
+ } else if ( ! empty( $aioseop_options['modules']['aiosp_feature_manager_options'][ $module ] ) && ! isset( $post[ $module ] ) ) {
5073
+ // this module was deactivated. This action should be registered NOT in the specific module but elsewhere because that module is not going to be loaded.
5074
+ do_action( $this->prefix . 'deactivate_' . $name );
5075
+ }
5076
+ }
5077
+ }
5078
+ }
5079
+
5080
  /**
5081
  * @param $menu_order
5082
  *
all_in_one_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: All In One SEO Pack
5
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
  Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007.
7
- Version: 2.8
8
  Author: Michael Torbert
9
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
10
  Text Domain: all-in-one-seo-pack
@@ -32,14 +32,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
- * @version 2.8
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
39
  define( 'AIOSEOPPRO', false );
40
  }
41
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
42
- define( 'AIOSEOP_VERSION', '2.8' );
43
  }
44
  global $aioseop_plugin_name;
45
  $aioseop_plugin_name = 'All in One SEO Pack';
@@ -480,9 +480,6 @@ if ( is_admin() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
480
  add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
481
  add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
482
  add_action( 'wp_ajax_aioseo_dismiss_sitemap_max_url_notice', 'aioseop_sitemap_max_url_notice_dismissed' );
483
- if ( AIOSEOPPRO ) {
484
- add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
485
- }
486
  }
487
 
488
  if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
4
  Plugin Name: All In One SEO Pack
5
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
  Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007.
7
+ Version: 2.9
8
  Author: Michael Torbert
9
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
10
  Text Domain: all-in-one-seo-pack
32
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
+ * @version 2.9
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
39
  define( 'AIOSEOPPRO', false );
40
  }
41
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
42
+ define( 'AIOSEOP_VERSION', '2.9' );
43
  }
44
  global $aioseop_plugin_name;
45
  $aioseop_plugin_name = 'All in One SEO Pack';
480
  add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
481
  add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
482
  add_action( 'wp_ajax_aioseo_dismiss_sitemap_max_url_notice', 'aioseop_sitemap_max_url_notice_dismissed' );
 
 
 
483
  }
484
 
485
  if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
css/modules/aioseop_module.css CHANGED
@@ -1,1505 +1,1509 @@
1
- /**
2
- * Controls all the styling of the plugin.
3
- *
4
- * @author Michael Torbert.
5
- * @author Semper Fi Web Design.
6
- * @copyright http://semperplugins.com
7
- * @package All-in-One-SEO-Pack.
8
- */
9
-
10
- .form-table.aioseop {
11
- clear: none;
12
- }
13
-
14
- .form-table.aioseop td {
15
- vertical-align: top;
16
- padding: 16px 0 10px 0;
17
- line-height: 20px;
18
- font-size: 12px;
19
- }
20
-
21
- .form-table.aioseop th {
22
- width: 200px;
23
- padding: 10px 0 12px 9px;
24
- }
25
-
26
- .aioseop_help_text_link,
27
- .aioseop_help_text_link:active {
28
- text-align: left;
29
- float: left;
30
- max-width: 300px;
31
- min-width: 1px;
32
- padding-top: 2px;
33
- outline: none;
34
- color: #888;
35
- font-family: sans-serif;
36
- }
37
-
38
- .aioseop_help_text_link span {
39
- font-size: 14px;
40
- }
41
-
42
- .aioseop_help_text_link:before {
43
- content: "\f223";
44
- font-size: 27px;
45
- font-family: dashicons;
46
- vertical-align: middle;
47
- }
48
-
49
- #aioseop-support .aioseop_metabox_text,
50
- #aioseop-support a {
51
- font-size: 14px;
52
- color: #000;
53
- text-decoration: none;
54
- }
55
-
56
- .aioseop_icon {
57
- display: inline-block;
58
- width: 40px;
59
- height: 40px;
60
- background-repeat: no-repeat;
61
- background-size: 100%;
62
- vertical-align: middle;
63
- margin: 10px;
64
- }
65
-
66
- .aioseop_book_icon {
67
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==);
68
- }
69
-
70
- .aioseop_cog_icon {
71
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=);
72
- }
73
-
74
- .aioseop_file_icon {
75
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==);
76
- }
77
-
78
- .aioseop_help_icon {
79
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC);
80
- }
81
-
82
- .aioseop_support_icon {
83
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC);
84
- }
85
-
86
- .aioseop_youtube_icon {
87
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==);
88
- }
89
-
90
- .aioseop_meta_box_help > label {
91
- position: absolute;
92
- margin-left: 8px;
93
- }
94
-
95
- div.aioseop_tip_icon {
96
- font-size: 14px;
97
- border: 1px solid #888;
98
- width: 1em;
99
- text-align: center;
100
- padding: 0 4px;
101
- -webkit-border-radius: 12px;
102
- -moz-border-radius: 12px;
103
- -webkit-box-shadow: 1px 1px 1px #888;
104
- -moz-box-shadow: 1px 1px 1px #888;
105
- box-shadow: 1px 1px 1px #888;
106
- border-radius: 12px;
107
- }
108
-
109
- div.aioseop_tip_icon:before {
110
- content: '?';
111
- }
112
-
113
- .aioseop_help_text_link img {
114
- width: 40px;
115
- float: left;
116
- }
117
-
118
- .aioseop_meta_box_help,
119
- .aioseop_meta_box_help:active {
120
- float: right;
121
- padding-left: 0;
122
- width: 16px;
123
- margin-right: 32px;
124
- text-decoration: none;
125
- height: 15px;
126
- padding-top: 1px;
127
- position: relative;
128
- }
129
-
130
- .aioseop_tabs .aioseop_meta_box_help,
131
- .aioseop_tabs .aioseop_meta_box_help:active {
132
- margin-top: 4px;
133
- margin-right: 45px;
134
- }
135
-
136
- .aioseop_label {
137
- color: #5F5F5F;
138
- font-weight: bold;
139
- line-height: 19px;
140
- display: inline-block;
141
- text-align: left;
142
- position: absolute;
143
- font-family: 'Open Sans', sans-serif;
144
- width: 26%;
145
- min-width: 120px;
146
- max-width: 230px;
147
- }
148
-
149
- .aioseop_option_div {
150
- max-height: 360px;
151
- min-height: 37px;
152
- width: 95%;
153
- overflow-y: auto;
154
- }
155
-
156
- .aioseop_overflowed {
157
- border: 1px solid #e1e1e1;
158
- }
159
-
160
- .aioseop input[type="text"], .aioseop input[type="url"] {
161
- color: #515151;
162
- height: 35px;
163
- padding: 10px 0 10px 10px;
164
- font-size: 14px;
165
- width: 95%;
166
- max-width: 600px;
167
- }
168
-
169
- .aioseop textarea {
170
- color: #515151;
171
- padding: 10px 0 0 10px;
172
- margin: 0;
173
- font-size: 14px;
174
- line-height: 25px;
175
- width: 95%;
176
- max-width: 600px;
177
- }
178
-
179
- .aioseop_help_text_div {
180
- text-align: left;
181
- width: 100%;
182
- margin: 0;
183
- }
184
-
185
- .aioseop_help_text {
186
- font-size: 12px;
187
- float: left;
188
- clear: left;
189
- color: #797979;
190
- line-height: 15px;
191
- font-style: italic;
192
- }
193
-
194
- .aioseop_head_tagline {
195
- color: #5F5F5F;
196
- font-size: 13px;
197
- }
198
-
199
- .aioseop_head_nav {
200
- float: left;
201
- font-size: 18px;
202
- margin: 0 0 16px 0;
203
- font-family: "HelveticaNeue-Light",
204
- "Helvetica Neue Light",
205
- "Helvetica Neue",
206
- sans-serif;
207
- border-bottom: 1px solid #CCC;
208
- width: 100%;
209
- }
210
-
211
- .aioseop_head_nav_tab {
212
- padding: 10px 15px 10px 15px;
213
- margin: 0 0 0 15px;
214
- border-radius: 4px 4px 0 0;
215
- border: 1px solid #CCC;
216
- border-bottom: 0 white;
217
- float: left;
218
- opacity: 0.5;
219
- color: black;
220
- text-shadow: white 0 1px 0;
221
- text-decoration: none;
222
- }
223
-
224
- .aioseop_head_nav_tab.aioseop_head_nav_active {
225
- opacity: 1;
226
- margin-bottom: -1px;
227
- border-width: 1px;
228
- }
229
-
230
- .aioseop_head_nav_tab:first-child {
231
- margin-left: 0;
232
- }
233
-
234
- .aioseop_head_nav_tab:hover {
235
- opacity: 1;
236
- }
237
-
238
- .aioseop_header {
239
- float: left;
240
- clear: left;
241
- }
242
-
243
- .aioseop_advert {
244
- padding: 10px;
245
- margin-bottom: 30px;
246
- border: 1px solid #DDD;
247
- height: 200px;
248
- width: 423px;
249
- }
250
-
251
- .aioseop_nopad {
252
- padding-left: 0;
253
- padding-top: 0;
254
- }
255
-
256
- .aioseop_nopad_all {
257
- padding: 0;
258
- height: 220px;
259
- width: 445px;
260
- margin-bottom: 20px;
261
- border: none;
262
- }
263
-
264
- .aioseop_adverts {
265
- float: right;
266
- }
267
-
268
- .wincherad {
269
- width: 100%;
270
- height: 100%;
271
- background-size: 100%;
272
- background-repeat: no-repeat;
273
- margin-bottom: 0;
274
- border: none;
275
- }
276
-
277
- #wincher21 {
278
- background-image: url(../../modules/images/banner21.jpg);
279
- }
280
-
281
- #wincher22 {
282
- background-image: url(../../modules/images/banner22.jpg);
283
- }
284
-
285
- .aioseop_content {
286
- min-width: 760px;
287
- clear: left;
288
- }
289
-
290
- .aioseop_options_wrapper .hndle {
291
- font-size: 15px;
292
- font-family: Georgia,
293
- "Times New Roman",
294
- "Bitstream Charter",
295
- Times,
296
- serif;
297
- font-weight: normal;
298
- padding: 7px 10px;
299
- margin: 0;
300
- line-height: 1;
301
- }
302
-
303
- .aioseop_options_wrapper .submit input.button-primary {
304
- margin-bottom: 5px;
305
- }
306
-
307
- #aiosp_feature_manager_metabox.postbox {
308
- margin-top: 20px;
309
- float: left;
310
- }
311
-
312
- .aioseop_advert p {
313
- margin: 25px 0 25px 0;
314
- }
315
-
316
- .aioseop_options_wrapper .postarea {
317
- border-color: #DFDFDF;
318
- -moz-box-shadow: inset 0 1px 0 #fff;
319
- -webkit-box-shadow: inset 0 1px 0 #fff;
320
- box-shadow: inset 0 1px 0 #fff;
321
- -moz-border-radius: 3px;
322
- -webkit-border-radius: 3px;
323
- border-radius: 3px;
324
- }
325
-
326
- .aioseop_advert h3 {
327
- padding: 0;
328
- margin-top: 6px;
329
- }
330
-
331
- .aioseop_metabox_text p {
332
- margin: 0 0 0 0;
333
- width: 101%;
334
- }
335
-
336
- .aioseop_sidebar {
337
- width: 457px;
338
- margin-left: 10px;
339
- }
340
-
341
- .aioseop_metabox_text {
342
- margin-bottom: 0;
343
- }
344
-
345
- .aioseop_metabox_wrapper {
346
- padding: 0;
347
- }
348
-
349
- .aioseop_metabox_text *:last-child {
350
- margin: 0;
351
- }
352
-
353
- .aioseop_metabox_feature {
354
- margin-top: 20px;
355
- }
356
-
357
- .aioseop_translations {
358
- margin-top: 15px;
359
- }
360
-
361
- .aioseop_option_label {
362
- float: left;
363
- margin: 0;
364
- min-width: 150px;
365
- width: 37%;
366
- max-width: 270px;
367
- padding-top: 3px;
368
- padding-bottom: 3px;
369
- height: 67px !important; /*added for certain language support*/
370
- }
371
-
372
- .aioseop_metabox_text h2 {
373
- font-size: 14px;
374
- padding: 0;
375
- font-weight: bold;
376
- line-height: 29px;
377
- }
378
-
379
- #aioseop-about {
380
- width: 443px;
381
- margin-bottom: 20px;
382
- }
383
-
384
- #aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 {
385
- font-size: 13px;
386
- }
387
-
388
- .aioseop_sidebar #mc-embedded-subscribe-form {
389
- margin: 0 0 10px 0;
390
- background: white;
391
- padding: 10px 10px;
392
- border: 1px solid #DDD;
393
- }
394
-
395
- #aioseop-about .aioseop_metabox_text ul {
396
- list-style-type: disc;
397
- padding-left: 15px;
398
- }
399
-
400
- .aioseop input[readonly] {
401
- background-color: #EEE;
402
- margin: 5px 0 5px 0 !important;
403
- }
404
-
405
- .aioseop_settings_left {
406
- float: left;
407
- padding: 0;
408
- margin: 0;
409
- width: 100%;
410
- }
411
-
412
- body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left {
413
- margin-top: 20px;
414
- }
415
-
416
- body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left {
417
- margin-top: 20px;
418
- }
419
-
420
- #aioseop_top_button {
421
- margin-top: 5px;
422
- height: 30px;
423
- }
424
-
425
- #aioseop-list #mce-EMAIL {
426
- margin-top: 5px;
427
- width: 250px;
428
- }
429
-
430
- .aioseop_top {
431
- margin: 10px 10px 0 0;
432
- /* margin: 10px 477px 0px 0px; */
433
- }
434
-
435
- .aioseop_top #aioseop-list {
436
- margin-bottom: 0;
437
- }
438
-
439
- .aioseop_top #aioseop-list.postbox.closed {
440
- overflow: hidden;
441
- }
442
-
443
- .aioseop_right_sidebar {
444
- float: right;
445
- margin-top: 35px;
446
- }
447
-
448
- #aiosp_settings_form .button-primary.hidden {
449
- display: none;
450
- }
451
-
452
- form#edittag div#aiosp_titleatr_wrapper,
453
- form#edittag div#aiosp_menulabel_wrapper,
454
- form#edittag div#aiosp_sitemap_exclude_wrapper {
455
- display: none;
456
- }
457
-
458
- .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button {
459
- height: 5px;
460
- position: absolute;
461
- top: 0;
462
- width: 97%;
463
- }
464
-
465
- .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left {
466
- margin-top: 10px;
467
- }
468
-
469
- .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
470
- margin-top: 10px;
471
- }
472
-
473
- div#aiosp_feature_manager_metabox .inside {
474
- padding: 8px;
475
- }
476
-
477
- div.aioseop_feature {
478
- position: relative;
479
- display: inline-block;
480
- float: left;
481
- vertical-align: top;
482
- width: 240px;
483
- height: 288px;
484
- margin: 8px;
485
- border: 1px solid #DEDEDE;
486
- -moz-border-radius: 3px;
487
- -webkit-border-radius: 3px;
488
- border-radius: 3px;
489
- background: white;
490
- padding: 10px 0 0;
491
- -webkit-box-shadow: inset 0 1px 0 #fff,
492
- inset 0 0 20px rgba(0, 0, 0, 0.05),
493
- 0 1px 2px rgba(0, 0, 0, 0.1);
494
- -moz-box-shadow: inset 0 1px 0 #fff,
495
- inset 0 0 20px rgba(0, 0, 0, 0.05),
496
- 0 1px 2px rgba(0, 0, 0, 0.1);
497
- box-shadow: inset 0 1px 0 #fff,
498
- inset 0 0 20px rgba(0, 0, 0, 0.05),
499
- 0 1px 2px rgba(0, 0, 0, 0.1);
500
- -webkit-transition-duration: .4s;
501
- -moz-transition-duration: .4s;
502
- }
503
-
504
- .aioseop_feature .flag {
505
- float: right;
506
- margin-right: -7px;
507
- background: none repeat scroll 0 0 #D23D46;
508
- color: #FFFFFF;
509
- padding: 5px 12px 6px 5px;
510
- position: relative;
511
- }
512
-
513
- .aioseop_feature .flag:before {
514
- border-color: #D23D46 #D23D46 #D23D46 transparent;
515
- border-style: solid;
516
- border-width: 14px 4px 15px 10px;
517
- content: "";
518
- left: -14px;
519
- position: absolute;
520
- top: 0;
521
- }
522
-
523
- .aioseop_feature .flag:after {
524
- border-color: #892026 transparent transparent;
525
- border-style: solid;
526
- border-width: 6px 6px 6px 0;
527
- bottom: -12px;
528
- content: "";
529
- position: absolute;
530
- right: 0;
531
- }
532
-
533
- .aioseop_feature .flag.pro {
534
- display: none;
535
- }
536
-
537
- #aioseop_coming_soon .free.flag,
538
- .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag {
539
- display: none;
540
- }
541
-
542
- #aioseop_coming_soon .flag.pro {
543
- display: block;
544
- margin-top: -30px;
545
- }
546
-
547
- .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro {
548
- display: none;
549
- }
550
-
551
- .aioseop_feature h3 {
552
- font-size: 17px;
553
- margin: 0;
554
- padding: 0 10px 5px 10px;
555
- font-weight: normal;
556
- font-style: normal;
557
- font-family: "Helvetica Neue",
558
- Helvetica,
559
- Arial,
560
- "Lucida Grande",
561
- Verdana,
562
- "Bitstream Vera Sans",
563
- sans-serif;
564
- }
565
-
566
- .aioseop_feature p {
567
- line-height: 150%;
568
- font-size: 12px;
569
- font-family: Georgia,
570
- "Times New Roman",
571
- "Bitstream Charter",
572
- Times, serif;
573
- margin-bottom: 20px;
574
- color: #666;
575
- padding: 0 10px;
576
- }
577
-
578
- .aioseop_feature p.aioseop_desc {
579
- min-height: 80px;
580
- }
581
-
582
- .aioseop_feature .feature_button {
583
- float: right;
584
- margin-bottom: 10px;
585
- margin-right: 10px;
586
- min-width: 80px;
587
- text-align: center;
588
- }
589
-
590
- .aioseop_feature .feature_button:before {
591
- content: "Activate";
592
- }
593
-
594
- .aioseop_feature .active.feature_button:before {
595
- content: "Deactivate";
596
- }
597
-
598
- div.aioseop_feature .aioseop_featured_image {
599
- min-height: 100px;
600
- background-repeat: no-repeat;
601
- display: block;
602
- margin: 0 auto;
603
- width: 133px;
604
- }
605
-
606
- div.aioseop_feature .aioseop_featured_image {
607
- background-image: url(../../modules/images/Default-BW-Standard.png);
608
- }
609
-
610
- div.aioseop_feature .aioseop_featured_image.active {
611
- background-image: url(../../modules/images/Default-Color-Standard.png);
612
- }
613
-
614
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
615
- background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png);
616
- }
617
-
618
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
619
- background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png);
620
- }
621
-
622
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
623
- background-image: url(../../modules/images/VideoSitemap-BW-Standard.png);
624
- }
625
-
626
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
627
- background-image: url(../../modules/images/VideoSitemap-Color-Standard.png);
628
- }
629
-
630
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
631
- background-image: url(../../modules/images/SocialMeta-BW-Standard.png);
632
- }
633
-
634
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
635
- background-image: url(../../modules/images/SocialMeta-Color-Standard.png);
636
- }
637
-
638
- div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
639
- background-image: url(../../modules/images/Robots-BW-Standard.png);
640
- }
641
-
642
- div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
643
- background-image: url(../../modules/images/Robots-Color-Standard.png);
644
- }
645
-
646
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
647
- background-image: url(../../modules/images/FileEditor-BW-Standard.png);
648
- }
649
-
650
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
651
- background-image: url(../../modules/images/FileEditor-Color-Standard.png);
652
- }
653
-
654
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
655
- background-image: url(../../modules/images/ImporterExporter-BW-Standard.png);
656
- }
657
-
658
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
659
- background-image: url(../../modules/images/ImporterExporter-Color-Standard.png);
660
- }
661
-
662
- div.aioseop_feature#aioseop_performance .aioseop_featured_image {
663
- background-image: url(../../modules/images/Performance-BW-Standard.png);
664
- }
665
-
666
- div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
667
- background-image: url(../../modules/images/Performance-Color-Standard.png);
668
- }
669
-
670
- div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
671
- background-image: url(../../modules/images/Default-Color-Standard.png);
672
- }
673
-
674
- div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
675
- background-image: url(../../modules/images/Default-Color-Standard.png);
676
- }
677
-
678
- .All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table,
679
- .All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table {
680
- max-width: 500px;
681
- clear: none;
682
- }
683
-
684
- .aioseop_follow_button {
685
- min-height: 50px;
686
- background-repeat: no-repeat;
687
- display: inline-block;
688
- width: 100px;
689
- background-size: auto 50px !important;
690
- margin-right: 0;
691
- }
692
-
693
- .aioseop_facebook_follow {
694
- background-image: url(../../modules/images/facebook-follow-standard.png);
695
- }
696
-
697
- .aioseop_twitter_follow {
698
- background-image: url(../../modules/images/twitter-follow-standard.png);
699
- }
700
-
701
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) {
702
- div.aioseop_feature .aioseop_featured_image {
703
- background-size: auto 100px !important;
704
- }
705
-
706
- div.aioseop_feature .aioseop_featured_image.active {
707
- background-image: url(../../modules/images/Default-Color-Retina.png);
708
- }
709
-
710
- div.aioseop_feature .aioseop_featured_image {
711
- background-image: url(../../modules/images/Default-BW-Retina.png);
712
- }
713
-
714
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
715
- background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png);
716
- }
717
-
718
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
719
- background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png);
720
- }
721
-
722
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
723
- background-image: url(../../modules/images/VideoSitemap-BW-Retina.png);
724
- }
725
-
726
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
727
- background-image: url(../../modules/images/VideoSitemap-Color-Retina.png);
728
- }
729
-
730
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
731
- background-image: url(../../modules/images/SocialMeta-BW-Retina.png);
732
- }
733
-
734
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
735
- background-image: url(../../modules/images/SocialMeta-Color-Retina.png);
736
- }
737
-
738
- div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
739
- background-image: url(../../modules/images/Robots-BW-Retina.png);
740
- }
741
-
742
- div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
743
- background-image: url(../../modules/images/Robots-Color-Retina.png);
744
- }
745
-
746
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
747
- background-image: url(../../modules/images/FileEditor-BW-Retina.png);
748
- }
749
-
750
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
751
- background-image: url(../../modules/images/FileEditor-Color-Retina.png);
752
- }
753
-
754
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
755
- background-image: url(../../modules/images/ImporterExporter-BW-Retina.png);
756
- }
757
-
758
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
759
- background-image: url(../../modules/images/ImporterExporter-Color-Retina.png);
760
- }
761
-
762
- div.aioseop_feature#aioseop_performance .aioseop_featured_image {
763
- background-image: url(../../modules/images/Performance-BW-Retina.png);
764
- }
765
-
766
- div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
767
- background-image: url(../../modules/images/Performance-Color-Retina.png);
768
- }
769
-
770
- div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
771
- background-image: url(../../modules/images/Default-BW-Retina.png);
772
- }
773
-
774
- div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
775
- background-image: url(../../modules/images/Default-BW-Retina.png);
776
- }
777
-
778
- .aioseop_facebook_follow {
779
- background-image: url(../../modules/images/facebook-follow-retina.png);
780
- }
781
-
782
- .aioseop_twitter_follow {
783
- background-image: url(../../modules/images/twitter-follow-retina.png);
784
- }
785
- }
786
-
787
- .aioseop_options {
788
- width: 100%;
789
- margin: 18px 0 10px 0;
790
- }
791
-
792
- .aioseop_wrapper {
793
- width: 100%;
794
- padding-left: 5px;
795
- }
796
-
797
- .aioseop_input {
798
- clear: left;
799
- width: 100%;
800
- padding: 5px;
801
- display: inline;
802
- }
803
-
804
- .aioseop_option_input {
805
- float: left;
806
- width: 61%;
807
- margin: 0;
808
- padding-left: 1px;
809
- min-width: 160px;
810
- /* max-width: 900px; */
811
- }
812
-
813
- /*** Sitemap Additional Pages section ***/
814
- #aiosp_sitemap_addl_pages_metabox .aioseop_options,
815
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_options {
816
- width: 97%;
817
- margin: 5px;
818
- }
819
-
820
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,
821
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper {
822
- display: block;
823
- width: 100%;
824
- float: none;
825
- margin: 0;
826
- }
827
-
828
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,
829
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input {
830
- display: block;
831
- width: 100%;
832
- }
833
-
834
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,
835
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper {
836
- padding: 0;
837
- }
838
-
839
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input,
840
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input {
841
- display: inline-block;
842
- vertical-align: middle;
843
- width: 25%;
844
- min-width: 120px;
845
- height: 70px;
846
- }
847
-
848
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,
849
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label {
850
- width: 70%;
851
- margin: 0;
852
- }
853
-
854
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,
855
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label {
856
- height: 30px !important;
857
- }
858
-
859
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,
860
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date {
861
- height: 36px;
862
- }
863
-
864
- #aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,
865
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type {
866
- margin: 0;
867
- }
868
-
869
- #aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,
870
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary {
871
- margin-left: 0 !important;
872
- }
873
-
874
- #aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,
875
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div {
876
- position: absolute;
877
- width: auto;
878
- margin: 5px 0 10px 0;
879
- }
880
-
881
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table,
882
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table {
883
- width: 96%;
884
- border: 1px solid #CCC;
885
- margin: 5px 5px 10px;
886
- }
887
-
888
- table.aioseop_table tr:nth-child(odd) {
889
- background-color: #EEE;
890
- }
891
-
892
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) {
893
- background-color: rgba(238, 238, 238, 0.5);
894
- }
895
-
896
- table.aioseop_table td {
897
- width: 23%;
898
- }
899
-
900
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
901
- width: 80%;
902
- max-width: 800px;
903
- display: block;
904
- border-top: 1px solid #dfdfdf;
905
- border-left: 1px solid #dfdfdf;
906
- }
907
-
908
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
909
- width: 18%;
910
- border-right: 1px solid #dfdfdf;
911
- border-bottom: 1px solid #dfdfdf;
912
- }
913
-
914
- .All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info {
915
- margin-top: 10px;
916
- border: 1px solid #dfdfdf;
917
- width: 80%;
918
- max-width: 800px;
919
- }
920
-
921
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th {
922
- background: #f1f1f1;
923
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
924
- background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
925
- background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
926
- background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
927
- background-image: linear-gradient(to top, #ececec, #f9f9f9);
928
- padding: 5px;
929
- border-bottom-color: #dfdfdf;
930
- text-shadow: #fff 0 1px 0;
931
- -webkit-box-shadow: 0 1px 0 #fff;
932
- -moz-box-shadow: 0 1px 0 #fff;
933
- box-shadow: 0 1px 0 #fff;
934
- }
935
-
936
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
937
- border-right: 1px solid #dfdfdf;
938
- border-bottom: 1px solid #dfdfdf;
939
- }
940
-
941
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item {
942
- display: inline-block;
943
- width: 30%;
944
- vertical-align: top;
945
- }
946
-
947
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) {
948
- font-weight: bold;
949
- }
950
-
951
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) {
952
- width: 70%;
953
- }
954
-
955
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
956
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
957
- width: 27%;
958
- padding-left: 5%;
959
- }
960
-
961
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,
962
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child {
963
- padding-left: 2%;
964
- }
965
-
966
- table.aioseop_table td, table.aioseop_table th {
967
- padding: 3px;
968
- }
969
-
970
- .aioseop_top_label .aioseop_option_input,
971
- .aioseop_no_label .aioseop_option_input {
972
- width: 100%;
973
- }
974
-
975
- #aiosp_settings_form .postbox {
976
- margin: 0 0 20px 0;
977
- }
978
-
979
- .aioseop_settings_left .postbox {
980
- float: left;
981
- width: 100%;
982
- }
983
-
984
- .aioseop_option_setting_label {
985
- min-height: 35px;
986
- display: inline-block;
987
- white-space: nowrap;
988
- overflow: hidden;
989
- padding-left: 1px;
990
- max-width: 229px;
991
- min-width: 160px;
992
- width: 33%;
993
- }
994
-
995
- .aioseop_settings_left .postbox .inside {
996
- padding: 0;
997
- margin: 0;
998
- clear: right;
999
- }
1000
-
1001
- #aiosp_robots_rules {
1002
- clear: left;
1003
- margin-left: 20px;
1004
- max-width: 1072px;
1005
- }
1006
-
1007
- #aiosp_robots_default_metabox .aioseop_wrapper {
1008
- width: 31%;
1009
- min-width: 165px;
1010
- display: inline-block;
1011
- max-width: 265px;
1012
- }
1013
-
1014
- #aiosp_robots_default_metabox .aioseop_help_text_div {
1015
- position: absolute;
1016
- margin: 5px 0 10px 0;
1017
- }
1018
-
1019
- #aiosp_robots_default_metabox .aioseop_option_input {
1020
- width: 94%;
1021
- min-width: 94%;
1022
- }
1023
-
1024
- #aiosp_robots_default_metabox table.aioseop_table {
1025
- width: 96%;
1026
- border: 1px solid #CCC;
1027
- margin: 5px 0 10px 0;
1028
- }
1029
-
1030
- #aiosp_robots_default_metabox table.aioseop_table td {
1031
- width: 25%;
1032
- padding-left: 5%;
1033
- }
1034
-
1035
- #aiosp_settings_form .aioseop_no_label, .aioseop_no_label {
1036
- float: left;
1037
- width: 92%;
1038
- max-width: 100%;
1039
- margin: 0 23px 0 13px;
1040
- }
1041
-
1042
- #aiosp_sitemap_status_metabox .handlediv.button-link {
1043
- display: none;
1044
- }
1045
-
1046
- #aiosp_sitemap_status_metabox.closed .inside {
1047
- display: block;
1048
- }
1049
-
1050
- .aioseop_top_label {
1051
- width: 96%;
1052
- margin: 0 10px;
1053
- }
1054
-
1055
- .aioseop_hidden_type {
1056
- margin: 0;
1057
- padding: 0;
1058
- height: 0;
1059
- }
1060
-
1061
- #aiosp_title_metabox #aiosp_force_rewrites_wrapper {
1062
- display: none;
1063
- height: 0;
1064
- }
1065
-
1066
- .aioseop_module.error.below-h2 {
1067
- padding: 5px 0;
1068
- margin: 0 477px 15px 0 !important;
1069
- }
1070
-
1071
- #aioseop_opengraph_settings .inside {
1072
- margin: 0;
1073
- }
1074
-
1075
- #aioseop_opengraph_settings_image_wrapper img {
1076
- width: auto;
1077
- height: 75px;
1078
- }
1079
-
1080
- #aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label {
1081
- max-width: 160px;
1082
- min-width: 100px;
1083
- width: 30%;
1084
- }
1085
-
1086
- .aioseop_input input[type="checkbox"],
1087
- .aioseop_input input[type="radio"] {
1088
- vertical-align: text-bottom;
1089
- margin-top: 8px;
1090
- }
1091
-
1092
- #aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div {
1093
- max-height: initial;
1094
- }
1095
-
1096
- #aiosp {
1097
- width: auto;
1098
- }
1099
-
1100
- .aioseop_input.aioseop_top_label .aioseop_option_input {
1101
- margin: 0 0 10px 0;
1102
- }
1103
-
1104
- .aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div {
1105
- max-height: none;
1106
- }
1107
-
1108
- /* Robots.txt styling */
1109
- #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
1110
- #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
1111
- max-height: none;
1112
- }
1113
-
1114
- .aioseop_option_input .widefat td {
1115
- vertical-align: middle;
1116
- }
1117
-
1118
- .entry-row.robots.quirks {
1119
- font-weight: bold;
1120
- opacity: 1;
1121
- }
1122
-
1123
- .entry-row.robots {
1124
- opacity: 0.8;
1125
- }
1126
-
1127
- .entry-row.robots.invalid {
1128
- opacity: 1;
1129
- font-weight: bold;
1130
- }
1131
-
1132
- .invalid .entry_label {
1133
- font-weight: bold;
1134
- }
1135
-
1136
- .aioseop .aioseop_option_input tbody {
1137
- background: #FCFCFC;
1138
- }
1139
-
1140
- .All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody {
1141
- background: transparent;
1142
- }
1143
-
1144
- .entry-row.robots div {
1145
- height: 20px;
1146
- vertical-align: middle;
1147
- width: 90%;
1148
- margin: 0 0 4px 0;
1149
- }
1150
-
1151
- .robots img {
1152
- margin: 0 0 0 2px;
1153
- opacity: 0.6;
1154
- }
1155
-
1156
- .aioseop_option_docs {
1157
- width: 98%;
1158
- display: none;
1159
- border: 1px solid #D3D3D3;
1160
- margin-top: 20px;
1161
- padding: 1%;
1162
- background-color: #EEE;
1163
- }
1164
-
1165
- .aioseop_option_docs h3 {
1166
- background: none;
1167
- }
1168
-
1169
- div.aioseop_notice {
1170
- position: relative;
1171
- }
1172
-
1173
- div.aioseop_notice a.aioseop_dismiss_link {
1174
- position: absolute;
1175
- top: 10px;
1176
- right: 10px;
1177
- }
1178
-
1179
- .aioseop_error_notice {
1180
- color: #f00;
1181
- font-weight: bold;
1182
- }
1183
-
1184
- .aioseop_input select {
1185
- margin: 7px 0;
1186
- }
1187
-
1188
- .aioseop_help_text ul {
1189
- margin: 15px 0 0 20px;
1190
- }
1191
-
1192
- .aioseop_help_text ul li {
1193
- line-height: 20px;
1194
- margin: 0;
1195
- }
1196
-
1197
- .aioseop_sidebar #side-sortables {
1198
- width: 98%;
1199
- }
1200
-
1201
- #aioseop_opengraph_settings .aioseop_option_label {
1202
- width: 30%;
1203
- }
1204
-
1205
- .aioseop_tabs {
1206
- padding-top: 6px;
1207
- }
1208
-
1209
- .aioseop_tabs.hide,
1210
- .aioseop_header_tabs.hide {
1211
- display: block !important;
1212
- }
1213
-
1214
- .aioseop_header_tabs li {
1215
- display: inline;
1216
- padding: 0;
1217
- margin: 0;
1218
- }
1219
-
1220
- .aioseop_header_tabs {
1221
- margin: 0;
1222
- }
1223
-
1224
- .aioseop_header_nav {
1225
- margin: 0;
1226
- }
1227
-
1228
- .aioseop_header_tabs li a.aioseop_header_tab.active {
1229
- background-color: rgb(255, 255, 255);
1230
- border-bottom-color: rgba(255, 255, 255, 0.5);
1231
- font-weight: bold;
1232
- }
1233
-
1234
- .aioseop_header_tabs li a.aioseop_header_tab {
1235
- font-size: 14px;
1236
- line-height: 37px;
1237
- text-decoration: none;
1238
- margin: 5px 5px 0 0;
1239
- padding: 10px;
1240
- cursor: pointer;
1241
- -webkit-border-top-right-radius: 3px;
1242
- -webkit-border-top-left-radius: 3px;
1243
- border-top-right-radius: 3px;
1244
- border-top-left-radius: 3px;
1245
- background-color: #e5e5e5;
1246
- border: 1px solid #ccc;
1247
- color: #5F5F5F;
1248
- }
1249
-
1250
- .aioseop_header_tabs li:first-child a.aioseop_header_tab {
1251
- border-left: solid 1px #CCC;
1252
- margin-left: 5px;
1253
- }
1254
-
1255
- .aioseop_tab {
1256
- border: solid 1px #CCC;
1257
- background-color: rgb(255, 255, 255);
1258
- background-color: rgba(255, 255, 255, 0.5);
1259
- padding: 10px;
1260
- }
1261
-
1262
- .aioseop_loading {
1263
- background-image: url('../../images/activity.gif');
1264
- display: inline-block;
1265
- width: 24px;
1266
- height: 24px;
1267
- margin: 0;
1268
- padding: 0;
1269
- vertical-align: bottom;
1270
- }
1271
-
1272
- .aiosp_delete {
1273
- background-image: url('../../images/delete.png');
1274
- display: inline-block;
1275
- width: 16px;
1276
- height: 16px;
1277
- margin: 0;
1278
- padding: 0;
1279
- vertical-align: bottom;
1280
- }
1281
-
1282
- form#aiosp_settings_form,
1283
- .aioseop_tabs_div {
1284
- padding-right: 477px;
1285
- }
1286
-
1287
- .aioseop_tabs_div {
1288
- margin-top: 10px;
1289
- }
1290
-
1291
- #aiosp_settings_form ul.sfwd_debug_settings li strong {
1292
- display: block;
1293
- float: left;
1294
- text-align: right;
1295
- background-color: #DDD;
1296
- margin-right: 8px;
1297
- padding: 1px 8px 1px 1px;
1298
- overflow: auto;
1299
- width: 200px;
1300
- min-height: 16px;
1301
- }
1302
-
1303
- #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong {
1304
- background-color: #CCC;
1305
- }
1306
-
1307
- #aiosp_settings_form ul.sfwd_debug_settings li {
1308
- clear: left;
1309
- margin: 0;
1310
- padding: 0;
1311
- background-color: #EEE;
1312
- overflow: auto;
1313
- max-width: 75%;
1314
- min-width: 800px;
1315
- }
1316
-
1317
- #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) {
1318
- background-color: #DDD;
1319
- }
1320
-
1321
- div.sfwd_debug_mail_sent {
1322
- background-color: #080;
1323
- border: 1px solid #0A0;
1324
- margin: 10px 0 10px 0;
1325
- width: 598px;
1326
- color: #FFF;
1327
- text-align: center;
1328
- }
1329
-
1330
- div.sfwd_debug_error {
1331
- background-color: #F00;
1332
- color: #FFF;
1333
- border: 1px solid #A00;
1334
- margin: 10px 0 10px 0;
1335
- width: 598px;
1336
- text-align: center;
1337
- font-weight: bolder;
1338
- }
1339
-
1340
- #aiosp_performance_status_wrapper .aioseop_option_div {
1341
- max-height: 420px;
1342
- }
1343
-
1344
- #aioseop_coming_soon, #aioseop_coming_soon2 {
1345
- padding-top: 40px;
1346
- text-align: center;
1347
- height: 258px;
1348
- font-size: 16px;
1349
- }
1350
-
1351
- .MRL {
1352
- margin-left: 20px !important;
1353
- margin-bottom: 10px !important;
1354
- }
1355
-
1356
- /**
1357
- * Edit Post screen specific styling
1358
- *
1359
- */
1360
- .postbox-container .aioseop_option_div {
1361
- width: 100%;
1362
- }
1363
-
1364
- .postbox-container .aioseop_option_div input[type="text"],
1365
- .postbox-container .aioseop_option_div textarea {
1366
- width: 99%;
1367
- max-width: 900px;
1368
- }
1369
-
1370
- .postbox-container .aioseop_option_label {
1371
- max-width: none;
1372
- height: auto !important;
1373
- }
1374
-
1375
- .postbox-container .aioseop_wrapper {
1376
- padding: 0;
1377
- }
1378
-
1379
- .postbox-container .aioseop_input {
1380
- display: block;
1381
- margin-bottom: 10px;
1382
- padding: 0;
1383
- }
1384
-
1385
- .postbox-container .aioseop_option_input {
1386
- width: 63%;
1387
- padding: 0;
1388
- }
1389
-
1390
- .postbox-container div#aiosp_upgrade_wrapper {
1391
- float: none;
1392
- width: auto;
1393
- margin: 0;
1394
- padding: 0;
1395
- }
1396
-
1397
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input {
1398
- display: block;
1399
- padding: 0;
1400
- }
1401
-
1402
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input {
1403
- float: none;
1404
- width: auto;
1405
- padding: 0;
1406
- }
1407
-
1408
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div {
1409
- width: auto;
1410
- min-height: 0;
1411
- padding: 10px 0;
1412
- }
1413
-
1414
- .aioseop_tabs .aioseop_options {
1415
- margin: 0;
1416
- }
1417
-
1418
- #aioseop_opengraph_settings .aioseop_options {
1419
- clear: both;
1420
- margin-top: 35px;
1421
- }
1422
-
1423
- #aioseop_opengraph_settings .aioseop_option_input {
1424
- width: 70%;
1425
- }
1426
-
1427
- /**
1428
- * Preview Snippet styling
1429
- *
1430
- */
1431
- div#aiosp_snippet_wrapper {
1432
- border: 1px solid #888;
1433
- clear: both;
1434
- padding: 10px 10px 0;
1435
- max-width: 97%;
1436
- margin-bottom: 15px;
1437
- }
1438
-
1439
- div#aiosp_snippet_wrapper .aioseop_option_label {
1440
- height: auto !important;
1441
- }
1442
-
1443
- div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input {
1444
- margin: 0;
1445
- }
1446
-
1447
- div#aioseop_snippet {
1448
- font-family: arial, sans-serif;
1449
- font-size: 13px;
1450
- }
1451
-
1452
- div#aioseop_snippet > h3 {
1453
- margin: 10px 0 5px;
1454
- font-size: 18px;
1455
- border: 0;
1456
- background: inherit;
1457
- font-weight: normal;
1458
- }
1459
-
1460
- div#aioseop_snippet > h3 > a {
1461
- color: #12c;
1462
- text-decoration: none;
1463
- cursor: pointer;
1464
- }
1465
-
1466
- div#aioseop_snippet > div {
1467
- color: #545454;
1468
- max-width: 48em;
1469
- }
1470
-
1471
- div#aioseop_snippet > div > div {
1472
- display: block;
1473
- margin-bottom: 1px;
1474
- }
1475
-
1476
- div#aioseop_snippet > div > div > cite {
1477
- color: #093;
1478
- font-style: normal;
1479
- }
1480
-
1481
- div#aioseop_snippet > div > span {
1482
- margin: 0;
1483
- padding: 0;
1484
- border: 0;
1485
- }
1486
-
1487
- /* the good, the bad and the ugly character counts */
1488
- .aioseop_count_good {
1489
- color: #515151 !important;
1490
- background-color: #eee !important;
1491
- }
1492
- .aioseop_count_bad {
1493
- color: #515151 !important;
1494
- background-color: #ff0 !important;
1495
- }
1496
- .aioseop_count_ugly {
1497
- color: #fff !important;
1498
- background-color: #f00 !important;
1499
- }
1500
-
1501
- textarea.robots-text {
1502
- background-color: #eee;
1503
- width: 100%;
1504
- height: 100%;
 
 
 
 
1505
  }
1
+ /**
2
+ * Controls all the styling of the plugin.
3
+ *
4
+ * @author Michael Torbert.
5
+ * @author Semper Fi Web Design.
6
+ * @copyright http://semperplugins.com
7
+ * @package All-in-One-SEO-Pack.
8
+ */
9
+
10
+ .form-table.aioseop {
11
+ clear: none;
12
+ }
13
+
14
+ .form-table.aioseop td {
15
+ vertical-align: top;
16
+ padding: 16px 0 10px 0;
17
+ line-height: 20px;
18
+ font-size: 12px;
19
+ }
20
+
21
+ .form-table.aioseop th {
22
+ width: 200px;
23
+ padding: 10px 0 12px 9px;
24
+ }
25
+
26
+ .aioseop_help_text_link,
27
+ .aioseop_help_text_link:active {
28
+ text-align: left;
29
+ float: left;
30
+ max-width: 300px;
31
+ min-width: 1px;
32
+ padding-top: 2px;
33
+ outline: none;
34
+ color: #888;
35
+ font-family: sans-serif;
36
+ }
37
+
38
+ .aioseop_help_text_link span {
39
+ font-size: 14px;
40
+ }
41
+
42
+ .aioseop_help_text_link:before {
43
+ content: "\f223";
44
+ font-size: 27px;
45
+ font-family: dashicons;
46
+ vertical-align: middle;
47
+ }
48
+
49
+ #aioseop-support .aioseop_metabox_text,
50
+ #aioseop-support a {
51
+ font-size: 14px;
52
+ color: #000;
53
+ text-decoration: none;
54
+ }
55
+
56
+ .aioseop_icon {
57
+ display: inline-block;
58
+ width: 40px;
59
+ height: 40px;
60
+ background-repeat: no-repeat;
61
+ background-size: 100%;
62
+ vertical-align: middle;
63
+ margin: 10px;
64
+ }
65
+
66
+ .aioseop_book_icon {
67
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==);
68
+ }
69
+
70
+ .aioseop_cog_icon {
71
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=);
72
+ }
73
+
74
+ .aioseop_file_icon {
75
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==);
76
+ }
77
+
78
+ .aioseop_help_icon {
79
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC);
80
+ }
81
+
82
+ .aioseop_support_icon {
83
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC);
84
+ }
85
+
86
+ .aioseop_youtube_icon {
87
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==);
88
+ }
89
+
90
+ .aioseop_meta_box_help > label {
91
+ position: absolute;
92
+ margin-left: 8px;
93
+ }
94
+
95
+ div.aioseop_tip_icon {
96
+ font-size: 14px;
97
+ border: 1px solid #888;
98
+ width: 1em;
99
+ text-align: center;
100
+ padding: 0 4px;
101
+ -webkit-border-radius: 12px;
102
+ -moz-border-radius: 12px;
103
+ -webkit-box-shadow: 1px 1px 1px #888;
104
+ -moz-box-shadow: 1px 1px 1px #888;
105
+ box-shadow: 1px 1px 1px #888;
106
+ border-radius: 12px;
107
+ }
108
+
109
+ div.aioseop_tip_icon:before {
110
+ content: '?';
111
+ }
112
+
113
+ .aioseop_help_text_link img {
114
+ width: 40px;
115
+ float: left;
116
+ }
117
+
118
+ .aioseop_meta_box_help,
119
+ .aioseop_meta_box_help:active {
120
+ float: right;
121
+ padding-left: 0;
122
+ width: 16px;
123
+ margin-right: 32px;
124
+ text-decoration: none;
125
+ height: 15px;
126
+ padding-top: 1px;
127
+ position: relative;
128
+ }
129
+
130
+ .aioseop_tabs .aioseop_meta_box_help,
131
+ .aioseop_tabs .aioseop_meta_box_help:active {
132
+ margin-top: 4px;
133
+ margin-right: 45px;
134
+ }
135
+
136
+ .aioseop_label {
137
+ color: #5F5F5F;
138
+ font-weight: bold;
139
+ line-height: 19px;
140
+ display: inline-block;
141
+ text-align: left;
142
+ position: absolute;
143
+ font-family: 'Open Sans', sans-serif;
144
+ width: 26%;
145
+ min-width: 120px;
146
+ max-width: 230px;
147
+ }
148
+
149
+ .aioseop_option_div {
150
+ max-height: 360px;
151
+ min-height: 37px;
152
+ width: 95%;
153
+ overflow-y: auto;
154
+ }
155
+
156
+ .aioseop_overflowed {
157
+ border: 1px solid #e1e1e1;
158
+ }
159
+
160
+ .aioseop input[type="text"], .aioseop input[type="url"] {
161
+ color: #515151;
162
+ height: 35px;
163
+ padding: 10px 0 10px 10px;
164
+ font-size: 14px;
165
+ width: 95%;
166
+ max-width: 600px;
167
+ }
168
+
169
+ .aioseop textarea {
170
+ color: #515151;
171
+ padding: 10px 0 0 10px;
172
+ margin: 0;
173
+ font-size: 14px;
174
+ line-height: 25px;
175
+ width: 95%;
176
+ max-width: 600px;
177
+ }
178
+
179
+ .aioseop_help_text_div {
180
+ text-align: left;
181
+ width: 100%;
182
+ margin: 0;
183
+ }
184
+
185
+ .aioseop_help_text {
186
+ font-size: 12px;
187
+ float: left;
188
+ clear: left;
189
+ color: #797979;
190
+ line-height: 15px;
191
+ font-style: italic;
192
+ }
193
+
194
+ .aioseop_head_tagline {
195
+ color: #5F5F5F;
196
+ font-size: 13px;
197
+ }
198
+
199
+ .aioseop_head_nav {
200
+ float: left;
201
+ font-size: 18px;
202
+ margin: 0 0 16px 0;
203
+ font-family: "HelveticaNeue-Light",
204
+ "Helvetica Neue Light",
205
+ "Helvetica Neue",
206
+ sans-serif;
207
+ border-bottom: 1px solid #CCC;
208
+ width: 100%;
209
+ }
210
+
211
+ .aioseop_head_nav_tab {
212
+ padding: 10px 15px 10px 15px;
213
+ margin: 0 0 0 15px;
214
+ border-radius: 4px 4px 0 0;
215
+ border: 1px solid #CCC;
216
+ border-bottom: 0 white;
217
+ float: left;
218
+ opacity: 0.5;
219
+ color: black;
220
+ text-shadow: white 0 1px 0;
221
+ text-decoration: none;
222
+ }
223
+
224
+ .aioseop_head_nav_tab.aioseop_head_nav_active {
225
+ opacity: 1;
226
+ margin-bottom: -1px;
227
+ border-width: 1px;
228
+ }
229
+
230
+ .aioseop_head_nav_tab:first-child {
231
+ margin-left: 0;
232
+ }
233
+
234
+ .aioseop_head_nav_tab:hover {
235
+ opacity: 1;
236
+ }
237
+
238
+ .aioseop_header {
239
+ float: left;
240
+ clear: left;
241
+ }
242
+
243
+ .aioseop_advert {
244
+ padding: 10px;
245
+ margin-bottom: 30px;
246
+ border: 1px solid #DDD;
247
+ height: 200px;
248
+ width: 423px;
249
+ }
250
+
251
+ .aioseop_nopad {
252
+ padding-left: 0;
253
+ padding-top: 0;
254
+ }
255
+
256
+ .aioseop_nopad_all {
257
+ padding: 0;
258
+ height: 220px;
259
+ width: 445px;
260
+ margin-bottom: 20px;
261
+ border: none;
262
+ }
263
+
264
+ .aioseop_adverts {
265
+ float: right;
266
+ }
267
+
268
+ .wincherad {
269
+ width: 100%;
270
+ height: 100%;
271
+ background-size: 100%;
272
+ background-repeat: no-repeat;
273
+ margin-bottom: 0;
274
+ border: none;
275
+ }
276
+
277
+ #wincher21 {
278
+ background-image: url(../../modules/images/banner21.jpg);
279
+ }
280
+
281
+ #wincher22 {
282
+ background-image: url(../../modules/images/banner22.jpg);
283
+ }
284
+
285
+ .aioseop_content {
286
+ min-width: 760px;
287
+ clear: left;
288
+ }
289
+
290
+ .aioseop_options_wrapper .hndle {
291
+ font-size: 15px;
292
+ font-family: Georgia,
293
+ "Times New Roman",
294
+ "Bitstream Charter",
295
+ Times,
296
+ serif;
297
+ font-weight: normal;
298
+ padding: 7px 10px;
299
+ margin: 0;
300
+ line-height: 1;
301
+ }
302
+
303
+ .aioseop_options_wrapper .submit input.button-primary {
304
+ margin-bottom: 5px;
305
+ }
306
+
307
+ #aiosp_feature_manager_metabox.postbox {
308
+ margin-top: 20px;
309
+ float: left;
310
+ }
311
+
312
+ .aioseop_advert p {
313
+ margin: 25px 0 25px 0;
314
+ }
315
+
316
+ .aioseop_options_wrapper .postarea {
317
+ border-color: #DFDFDF;
318
+ -moz-box-shadow: inset 0 1px 0 #fff;
319
+ -webkit-box-shadow: inset 0 1px 0 #fff;
320
+ box-shadow: inset 0 1px 0 #fff;
321
+ -moz-border-radius: 3px;
322
+ -webkit-border-radius: 3px;
323
+ border-radius: 3px;
324
+ }
325
+
326
+ .aioseop_advert h3 {
327
+ padding: 0;
328
+ margin-top: 6px;
329
+ }
330
+
331
+ .aioseop_metabox_text p {
332
+ margin: 0 0 0 0;
333
+ width: 101%;
334
+ }
335
+
336
+ .aioseop_sidebar {
337
+ width: 457px;
338
+ margin-left: 10px;
339
+ }
340
+
341
+ .aioseop_metabox_text {
342
+ margin-bottom: 0;
343
+ }
344
+
345
+ .aioseop_metabox_wrapper {
346
+ padding: 0;
347
+ }
348
+
349
+ .aioseop_metabox_text *:last-child {
350
+ margin: 0;
351
+ }
352
+
353
+ .aioseop_metabox_feature {
354
+ margin-top: 20px;
355
+ }
356
+
357
+ .aioseop_translations {
358
+ margin-top: 15px;
359
+ }
360
+
361
+ .aioseop_option_label {
362
+ float: left;
363
+ margin: 0;
364
+ min-width: 150px;
365
+ width: 37%;
366
+ max-width: 270px;
367
+ padding-top: 3px;
368
+ padding-bottom: 3px;
369
+ height: 67px !important; /*added for certain language support*/
370
+ }
371
+
372
+ .aioseop_metabox_text h2 {
373
+ font-size: 14px;
374
+ padding: 0;
375
+ font-weight: bold;
376
+ line-height: 29px;
377
+ }
378
+
379
+ #aioseop-about {
380
+ width: 443px;
381
+ margin-bottom: 20px;
382
+ }
383
+
384
+ #aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 {
385
+ font-size: 13px;
386
+ }
387
+
388
+ .aioseop_sidebar #mc-embedded-subscribe-form {
389
+ margin: 0 0 10px 0;
390
+ background: white;
391
+ padding: 10px 10px;
392
+ border: 1px solid #DDD;
393
+ }
394
+
395
+ #aioseop-about .aioseop_metabox_text ul {
396
+ list-style-type: disc;
397
+ padding-left: 15px;
398
+ }
399
+
400
+ .aioseop input[readonly] {
401
+ background-color: #EEE;
402
+ margin: 5px 0 5px 0 !important;
403
+ }
404
+
405
+ .aioseop_settings_left {
406
+ float: left;
407
+ padding: 0;
408
+ margin: 0;
409
+ width: 100%;
410
+ }
411
+
412
+ body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left {
413
+ margin-top: 20px;
414
+ }
415
+
416
+ body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left {
417
+ margin-top: 20px;
418
+ }
419
+
420
+ #aioseop_top_button {
421
+ margin-top: 5px;
422
+ height: 30px;
423
+ }
424
+
425
+ #aioseop-list #mce-EMAIL {
426
+ margin-top: 5px;
427
+ width: 250px;
428
+ }
429
+
430
+ .aioseop_top {
431
+ margin: 10px 10px 0 0;
432
+ /* margin: 10px 477px 0px 0px; */
433
+ }
434
+
435
+ .aioseop_top #aioseop-list {
436
+ margin-bottom: 0;
437
+ }
438
+
439
+ .aioseop_top #aioseop-list.postbox.closed {
440
+ overflow: hidden;
441
+ }
442
+
443
+ .aioseop_right_sidebar {
444
+ float: right;
445
+ margin-top: 35px;
446
+ }
447
+
448
+ #aiosp_settings_form .button-primary.hidden {
449
+ display: none;
450
+ }
451
+
452
+ form#edittag div#aiosp_titleatr_wrapper,
453
+ form#edittag div#aiosp_menulabel_wrapper,
454
+ form#edittag div#aiosp_sitemap_exclude_wrapper {
455
+ display: none;
456
+ }
457
+
458
+ .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button {
459
+ height: 5px;
460
+ position: absolute;
461
+ top: 0;
462
+ width: 97%;
463
+ }
464
+
465
+ .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left {
466
+ margin-top: 10px;
467
+ }
468
+
469
+ .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
470
+ margin-top: 10px;
471
+ }
472
+
473
+ div#aiosp_feature_manager_metabox .inside {
474
+ padding: 8px;
475
+ }
476
+
477
+ div.aioseop_feature {
478
+ position: relative;
479
+ display: inline-block;
480
+ float: left;
481
+ vertical-align: top;
482
+ width: 240px;
483
+ height: 288px;
484
+ margin: 8px;
485
+ border: 1px solid #DEDEDE;
486
+ -moz-border-radius: 3px;
487
+ -webkit-border-radius: 3px;
488
+ border-radius: 3px;
489
+ background: white;
490
+ padding: 10px 0 0;
491
+ -webkit-box-shadow: inset 0 1px 0 #fff,
492
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
493
+ 0 1px 2px rgba(0, 0, 0, 0.1);
494
+ -moz-box-shadow: inset 0 1px 0 #fff,
495
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
496
+ 0 1px 2px rgba(0, 0, 0, 0.1);
497
+ box-shadow: inset 0 1px 0 #fff,
498
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
499
+ 0 1px 2px rgba(0, 0, 0, 0.1);
500
+ -webkit-transition-duration: .4s;
501
+ -moz-transition-duration: .4s;
502
+ }
503
+
504
+ .aioseop_feature .flag {
505
+ float: right;
506
+ margin-right: -7px;
507
+ background: none repeat scroll 0 0 #D23D46;
508
+ color: #FFFFFF;
509
+ padding: 5px 12px 6px 5px;
510
+ position: relative;
511
+ }
512
+
513
+ .aioseop_feature .flag:before {
514
+ border-color: #D23D46 #D23D46 #D23D46 transparent;
515
+ border-style: solid;
516
+ border-width: 14px 4px 15px 10px;
517
+ content: "";
518
+ left: -14px;
519
+ position: absolute;
520
+ top: 0;
521
+ }
522
+
523
+ .aioseop_feature .flag:after {
524
+ border-color: #892026 transparent transparent;
525
+ border-style: solid;
526
+ border-width: 6px 6px 6px 0;
527
+ bottom: -12px;
528
+ content: "";
529
+ position: absolute;
530
+ right: 0;
531
+ }
532
+
533
+ .aioseop_feature .flag.pro {
534
+ display: none;
535
+ }
536
+
537
+ #aioseop_coming_soon .free.flag,
538
+ .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag {
539
+ display: none;
540
+ }
541
+
542
+ #aioseop_coming_soon .flag.pro {
543
+ display: block;
544
+ margin-top: -30px;
545
+ }
546
+
547
+ .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro {
548
+ display: none;
549
+ }
550
+
551
+ .aioseop_feature h3 {
552
+ font-size: 17px;
553
+ margin: 0;
554
+ padding: 0 10px 5px 10px;
555
+ font-weight: normal;
556
+ font-style: normal;
557
+ font-family: "Helvetica Neue",
558
+ Helvetica,
559
+ Arial,
560
+ "Lucida Grande",
561
+ Verdana,
562
+ "Bitstream Vera Sans",
563
+ sans-serif;
564
+ }
565
+
566
+ .aioseop_feature p {
567
+ line-height: 150%;
568
+ font-size: 12px;
569
+ font-family: Georgia,
570
+ "Times New Roman",
571
+ "Bitstream Charter",
572
+ Times, serif;
573
+ margin-bottom: 20px;
574
+ color: #666;
575
+ padding: 0 10px;
576
+ }
577
+
578
+ .aioseop_feature p.aioseop_desc {
579
+ min-height: 80px;
580
+ }
581
+
582
+ .aioseop_feature .feature_button {
583
+ float: right;
584
+ margin-bottom: 10px;
585
+ margin-right: 10px;
586
+ min-width: 80px;
587
+ text-align: center;
588
+ }
589
+
590
+ .aioseop_feature .feature_button:before {
591
+ content: "Activate";
592
+ }
593
+
594
+ .aioseop_feature .active.feature_button:before {
595
+ content: "Deactivate";
596
+ }
597
+
598
+ div.aioseop_feature .aioseop_featured_image {
599
+ min-height: 100px;
600
+ background-repeat: no-repeat;
601
+ display: block;
602
+ margin: 0 auto;
603
+ width: 133px;
604
+ }
605
+
606
+ div.aioseop_feature .aioseop_featured_image {
607
+ background-image: url(../../modules/images/Default-BW-Standard.png);
608
+ }
609
+
610
+ div.aioseop_feature .aioseop_featured_image.active {
611
+ background-image: url(../../modules/images/Default-Color-Standard.png);
612
+ }
613
+
614
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
615
+ background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png);
616
+ }
617
+
618
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
619
+ background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png);
620
+ }
621
+
622
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
623
+ background-image: url(../../modules/images/VideoSitemap-BW-Standard.png);
624
+ }
625
+
626
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
627
+ background-image: url(../../modules/images/VideoSitemap-Color-Standard.png);
628
+ }
629
+
630
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
631
+ background-image: url(../../modules/images/SocialMeta-BW-Standard.png);
632
+ }
633
+
634
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
635
+ background-image: url(../../modules/images/SocialMeta-Color-Standard.png);
636
+ }
637
+
638
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
639
+ background-image: url(../../modules/images/Robots-BW-Standard.png);
640
+ }
641
+
642
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
643
+ background-image: url(../../modules/images/Robots-Color-Standard.png);
644
+ }
645
+
646
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
647
+ background-image: url(../../modules/images/FileEditor-BW-Standard.png);
648
+ }
649
+
650
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
651
+ background-image: url(../../modules/images/FileEditor-Color-Standard.png);
652
+ }
653
+
654
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
655
+ background-image: url(../../modules/images/ImporterExporter-BW-Standard.png);
656
+ }
657
+
658
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
659
+ background-image: url(../../modules/images/ImporterExporter-Color-Standard.png);
660
+ }
661
+
662
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image {
663
+ background-image: url(../../modules/images/Performance-BW-Standard.png);
664
+ }
665
+
666
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
667
+ background-image: url(../../modules/images/Performance-Color-Standard.png);
668
+ }
669
+
670
+ div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
671
+ background-image: url(../../modules/images/Default-Color-Standard.png);
672
+ }
673
+
674
+ div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
675
+ background-image: url(../../modules/images/Default-Color-Standard.png);
676
+ }
677
+
678
+ .All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table,
679
+ .All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table {
680
+ max-width: 500px;
681
+ clear: none;
682
+ }
683
+
684
+ .aioseop_follow_button {
685
+ min-height: 50px;
686
+ background-repeat: no-repeat;
687
+ display: inline-block;
688
+ width: 100px;
689
+ background-size: auto 50px !important;
690
+ margin-right: 0;
691
+ }
692
+
693
+ .aioseop_facebook_follow {
694
+ background-image: url(../../modules/images/facebook-follow-standard.png);
695
+ }
696
+
697
+ .aioseop_twitter_follow {
698
+ background-image: url(../../modules/images/twitter-follow-standard.png);
699
+ }
700
+
701
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and ( min--moz-device-pixel-ratio: 1.5), only screen and ( -o-min-device-pixel-ratio: 3/2), only screen and ( min-device-pixel-ratio: 1.5), only screen and ( min-resolution: 1.5dppx) {
702
+ div.aioseop_feature .aioseop_featured_image {
703
+ background-size: auto 100px !important;
704
+ }
705
+
706
+ div.aioseop_feature .aioseop_featured_image.active {
707
+ background-image: url(../../modules/images/Default-Color-Retina.png);
708
+ }
709
+
710
+ div.aioseop_feature .aioseop_featured_image {
711
+ background-image: url(../../modules/images/Default-BW-Retina.png);
712
+ }
713
+
714
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
715
+ background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png);
716
+ }
717
+
718
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
719
+ background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png);
720
+ }
721
+
722
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
723
+ background-image: url(../../modules/images/VideoSitemap-BW-Retina.png);
724
+ }
725
+
726
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
727
+ background-image: url(../../modules/images/VideoSitemap-Color-Retina.png);
728
+ }
729
+
730
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
731
+ background-image: url(../../modules/images/SocialMeta-BW-Retina.png);
732
+ }
733
+
734
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
735
+ background-image: url(../../modules/images/SocialMeta-Color-Retina.png);
736
+ }
737
+
738
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
739
+ background-image: url(../../modules/images/Robots-BW-Retina.png);
740
+ }
741
+
742
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
743
+ background-image: url(../../modules/images/Robots-Color-Retina.png);
744
+ }
745
+
746
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
747
+ background-image: url(../../modules/images/FileEditor-BW-Retina.png);
748
+ }
749
+
750
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
751
+ background-image: url(../../modules/images/FileEditor-Color-Retina.png);
752
+ }
753
+
754
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
755
+ background-image: url(../../modules/images/ImporterExporter-BW-Retina.png);
756
+ }
757
+
758
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
759
+ background-image: url(../../modules/images/ImporterExporter-Color-Retina.png);
760
+ }
761
+
762
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image {
763
+ background-image: url(../../modules/images/Performance-BW-Retina.png);
764
+ }
765
+
766
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
767
+ background-image: url(../../modules/images/Performance-Color-Retina.png);
768
+ }
769
+
770
+ div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
771
+ background-image: url(../../modules/images/Default-BW-Retina.png);
772
+ }
773
+
774
+ div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
775
+ background-image: url(../../modules/images/Default-BW-Retina.png);
776
+ }
777
+
778
+ .aioseop_facebook_follow {
779
+ background-image: url(../../modules/images/facebook-follow-retina.png);
780
+ }
781
+
782
+ .aioseop_twitter_follow {
783
+ background-image: url(../../modules/images/twitter-follow-retina.png);
784
+ }
785
+ }
786
+
787
+ .aioseop_options {
788
+ width: 100%;
789
+ margin: 18px 0 10px 0;
790
+ }
791
+
792
+ .aioseop_wrapper {
793
+ width: 100%;
794
+ padding-left: 5px;
795
+ }
796
+
797
+ .aioseop_input {
798
+ clear: left;
799
+ width: 100%;
800
+ padding: 5px;
801
+ display: inline;
802
+ }
803
+
804
+ .aioseop_option_input {
805
+ float: left;
806
+ width: 61%;
807
+ margin: 0;
808
+ padding-left: 1px;
809
+ min-width: 160px;
810
+ /* max-width: 900px; */
811
+ }
812
+
813
+ /*** Sitemap Additional Pages section ***/
814
+ #aiosp_sitemap_addl_pages_metabox .aioseop_options,
815
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_options {
816
+ width: 97%;
817
+ margin: 5px;
818
+ }
819
+
820
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,
821
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper {
822
+ display: block;
823
+ width: 100%;
824
+ float: none;
825
+ margin: 0;
826
+ }
827
+
828
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,
829
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input {
830
+ display: block;
831
+ width: 100%;
832
+ }
833
+
834
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,
835
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper {
836
+ padding: 0;
837
+ }
838
+
839
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input,
840
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input {
841
+ display: inline-block;
842
+ vertical-align: middle;
843
+ width: 25%;
844
+ min-width: 120px;
845
+ height: 70px;
846
+ }
847
+
848
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,
849
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label {
850
+ width: 70%;
851
+ margin: 0;
852
+ }
853
+
854
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,
855
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label {
856
+ height: 30px !important;
857
+ }
858
+
859
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,
860
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date {
861
+ height: 36px;
862
+ }
863
+
864
+ #aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,
865
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type {
866
+ margin: 0;
867
+ }
868
+
869
+ #aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,
870
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary {
871
+ margin-left: 0 !important;
872
+ }
873
+
874
+ #aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,
875
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div {
876
+ position: absolute;
877
+ width: auto;
878
+ margin: 5px 0 10px 0;
879
+ }
880
+
881
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table,
882
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table {
883
+ width: 96%;
884
+ border: 1px solid #CCC;
885
+ margin: 5px 5px 10px;
886
+ }
887
+
888
+ table.aioseop_table tr:nth-child(odd) {
889
+ background-color: #EEE;
890
+ }
891
+
892
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) {
893
+ background-color: rgba(238, 238, 238, 0.5);
894
+ }
895
+
896
+ table.aioseop_table td {
897
+ width: 23%;
898
+ }
899
+
900
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
901
+ width: 80%;
902
+ max-width: 800px;
903
+ display: block;
904
+ border-top: 1px solid #dfdfdf;
905
+ border-left: 1px solid #dfdfdf;
906
+ }
907
+
908
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
909
+ width: 18%;
910
+ border-right: 1px solid #dfdfdf;
911
+ border-bottom: 1px solid #dfdfdf;
912
+ }
913
+
914
+ .All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info {
915
+ margin-top: 10px;
916
+ border: 1px solid #dfdfdf;
917
+ width: 80%;
918
+ max-width: 800px;
919
+ }
920
+
921
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th {
922
+ background: #f1f1f1;
923
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
924
+ background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
925
+ background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
926
+ background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
927
+ background-image: linear-gradient(to top, #ececec, #f9f9f9);
928
+ padding: 5px;
929
+ border-bottom-color: #dfdfdf;
930
+ text-shadow: #fff 0 1px 0;
931
+ -webkit-box-shadow: 0 1px 0 #fff;
932
+ -moz-box-shadow: 0 1px 0 #fff;
933
+ box-shadow: 0 1px 0 #fff;
934
+ }
935
+
936
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
937
+ border-right: 1px solid #dfdfdf;
938
+ border-bottom: 1px solid #dfdfdf;
939
+ }
940
+
941
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item {
942
+ display: inline-block;
943
+ width: 30%;
944
+ vertical-align: top;
945
+ }
946
+
947
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) {
948
+ font-weight: bold;
949
+ }
950
+
951
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) {
952
+ width: 70%;
953
+ }
954
+
955
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
956
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
957
+ width: 27%;
958
+ padding-left: 5%;
959
+ }
960
+
961
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,
962
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child {
963
+ padding-left: 2%;
964
+ }
965
+
966
+ table.aioseop_table td, table.aioseop_table th {
967
+ padding: 3px;
968
+ }
969
+
970
+ .aioseop_top_label .aioseop_option_input,
971
+ .aioseop_no_label .aioseop_option_input {
972
+ width: 100%;
973
+ }
974
+
975
+ #aiosp_settings_form .postbox {
976
+ margin: 0 0 20px 0;
977
+ }
978
+
979
+ .aioseop_settings_left .postbox {
980
+ float: left;
981
+ width: 100%;
982
+ }
983
+
984
+ .aioseop_option_setting_label {
985
+ min-height: 35px;
986
+ display: inline-block;
987
+ white-space: nowrap;
988
+ overflow: hidden;
989
+ padding-left: 1px;
990
+ max-width: 229px;
991
+ min-width: 160px;
992
+ width: 33%;
993
+ }
994
+
995
+ .aioseop_settings_left .postbox .inside {
996
+ padding: 0;
997
+ margin: 0;
998
+ clear: right;
999
+ }
1000
+
1001
+ #aiosp_robots_rules {
1002
+ clear: left;
1003
+ margin-left: 20px;
1004
+ max-width: 1072px;
1005
+ }
1006
+
1007
+ #aiosp_robots_default_metabox .aioseop_wrapper {
1008
+ width: 31%;
1009
+ min-width: 165px;
1010
+ display: inline-block;
1011
+ max-width: 265px;
1012
+ }
1013
+
1014
+ #aiosp_robots_default_metabox .aioseop_help_text_div {
1015
+ position: absolute;
1016
+ margin: 5px 0 10px 0;
1017
+ }
1018
+
1019
+ #aiosp_robots_default_metabox .aioseop_option_input {
1020
+ width: 94%;
1021
+ min-width: 94%;
1022
+ }
1023
+
1024
+ #aiosp_robots_default_metabox table.aioseop_table {
1025
+ width: 96%;
1026
+ border: 1px solid #CCC;
1027
+ margin: 5px 0 10px 0;
1028
+ }
1029
+
1030
+ #aiosp_robots_default_metabox table.aioseop_table td {
1031
+ width: 25%;
1032
+ padding-left: 5%;
1033
+ }
1034
+
1035
+ #aiosp_settings_form .aioseop_no_label, .aioseop_no_label {
1036
+ float: left;
1037
+ width: 92%;
1038
+ max-width: 100%;
1039
+ margin: 0 23px 0 13px;
1040
+ }
1041
+
1042
+ #aiosp_sitemap_status_metabox .handlediv.button-link {
1043
+ display: none;
1044
+ }
1045
+
1046
+ #aiosp_sitemap_status_metabox.closed .inside {
1047
+ display: block;
1048
+ }
1049
+
1050
+ .aioseop_top_label {
1051
+ width: 96%;
1052
+ margin: 0 10px;
1053
+ }
1054
+
1055
+ .aioseop_hidden_type {
1056
+ margin: 0;
1057
+ padding: 0;
1058
+ height: 0;
1059
+ }
1060
+
1061
+ #aiosp_title_metabox #aiosp_force_rewrites_wrapper {
1062
+ display: none;
1063
+ height: 0;
1064
+ }
1065
+
1066
+ .aioseop_module.error.below-h2 {
1067
+ padding: 5px 0;
1068
+ margin: 0 477px 15px 0 !important;
1069
+ }
1070
+
1071
+ #aioseop_opengraph_settings .inside {
1072
+ margin: 0;
1073
+ }
1074
+
1075
+ #aioseop_opengraph_settings_image_wrapper img {
1076
+ width: auto;
1077
+ height: 75px;
1078
+ }
1079
+
1080
+ #aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label {
1081
+ max-width: 160px;
1082
+ min-width: 100px;
1083
+ width: 30%;
1084
+ }
1085
+
1086
+ .aioseop_input input[type="checkbox"],
1087
+ .aioseop_input input[type="radio"] {
1088
+ vertical-align: text-bottom;
1089
+ margin-top: 8px;
1090
+ }
1091
+
1092
+ #aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div {
1093
+ max-height: initial;
1094
+ }
1095
+
1096
+ #aiosp {
1097
+ width: auto;
1098
+ }
1099
+
1100
+ .aioseop_input.aioseop_top_label .aioseop_option_input {
1101
+ margin: 0 0 10px 0;
1102
+ }
1103
+
1104
+ .aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div {
1105
+ max-height: none;
1106
+ }
1107
+
1108
+ /* Robots.txt styling */
1109
+ #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
1110
+ #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
1111
+ max-height: none;
1112
+ }
1113
+
1114
+ .aioseop_option_input .widefat td {
1115
+ vertical-align: middle;
1116
+ }
1117
+
1118
+ .entry-row.robots.quirks {
1119
+ font-weight: bold;
1120
+ opacity: 1;
1121
+ }
1122
+
1123
+ .entry-row.robots {
1124
+ opacity: 0.8;
1125
+ }
1126
+
1127
+ .entry-row.robots.invalid {
1128
+ opacity: 1;
1129
+ font-weight: bold;
1130
+ }
1131
+
1132
+ .invalid .entry_label {
1133
+ font-weight: bold;
1134
+ }
1135
+
1136
+ .aioseop .aioseop_option_input tbody {
1137
+ background: #FCFCFC;
1138
+ }
1139
+
1140
+ .All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody {
1141
+ background: transparent;
1142
+ }
1143
+
1144
+ .entry-row.robots div {
1145
+ height: 20px;
1146
+ vertical-align: middle;
1147
+ width: 90%;
1148
+ margin: 0 0 4px 0;
1149
+ }
1150
+
1151
+ .robots img {
1152
+ margin: 0 0 0 2px;
1153
+ opacity: 0.6;
1154
+ }
1155
+
1156
+ .aioseop_option_docs {
1157
+ width: 98%;
1158
+ display: none;
1159
+ border: 1px solid #D3D3D3;
1160
+ margin-top: 20px;
1161
+ padding: 1%;
1162
+ background-color: #EEE;
1163
+ }
1164
+
1165
+ .aioseop_option_docs h3 {
1166
+ background: none;
1167
+ }
1168
+
1169
+ div.aioseop_notice {
1170
+ position: relative;
1171
+ }
1172
+
1173
+ div.aioseop_notice a.aioseop_dismiss_link {
1174
+ position: absolute;
1175
+ top: 10px;
1176
+ right: 10px;
1177
+ }
1178
+
1179
+ .aioseop_error_notice {
1180
+ color: #f00;
1181
+ font-weight: bold;
1182
+ }
1183
+
1184
+ .aioseop_input select {
1185
+ margin: 7px 0;
1186
+ }
1187
+
1188
+ .aioseop_help_text ul {
1189
+ margin: 15px 0 0 20px;
1190
+ }
1191
+
1192
+ .aioseop_help_text ul li {
1193
+ line-height: 20px;
1194
+ margin: 0;
1195
+ }
1196
+
1197
+ .aioseop_sidebar #side-sortables {
1198
+ width: 98%;
1199
+ }
1200
+
1201
+ #aioseop_opengraph_settings .aioseop_option_label {
1202
+ width: 30%;
1203
+ }
1204
+
1205
+ .aioseop_tabs {
1206
+ padding-top: 6px;
1207
+ }
1208
+
1209
+ .aioseop_tabs.hide,
1210
+ .aioseop_header_tabs.hide {
1211
+ display: block !important;
1212
+ }
1213
+
1214
+ .aioseop_header_tabs li {
1215
+ display: inline;
1216
+ padding: 0;
1217
+ margin: 0;
1218
+ }
1219
+
1220
+ .aioseop_header_tabs {
1221
+ margin: 0;
1222
+ }
1223
+
1224
+ .aioseop_header_nav {
1225
+ margin: 0;
1226
+ }
1227
+
1228
+ .aioseop_header_tabs li a.aioseop_header_tab.active {
1229
+ background-color: rgb(255, 255, 255);
1230
+ border-bottom-color: rgba(255, 255, 255, 0.5);
1231
+ font-weight: bold;
1232
+ }
1233
+
1234
+ .aioseop_header_tabs li a.aioseop_header_tab {
1235
+ font-size: 14px;
1236
+ line-height: 37px;
1237
+ text-decoration: none;
1238
+ margin: 5px 5px 0 0;
1239
+ padding: 10px;
1240
+ cursor: pointer;
1241
+ -webkit-border-top-right-radius: 3px;
1242
+ -webkit-border-top-left-radius: 3px;
1243
+ border-top-right-radius: 3px;
1244
+ border-top-left-radius: 3px;
1245
+ background-color: #e5e5e5;
1246
+ border: 1px solid #ccc;
1247
+ color: #5F5F5F;
1248
+ }
1249
+
1250
+ .aioseop_header_tabs li:first-child a.aioseop_header_tab {
1251
+ border-left: solid 1px #CCC;
1252
+ margin-left: 5px;
1253
+ }
1254
+
1255
+ .aioseop_tab {
1256
+ border: solid 1px #CCC;
1257
+ background-color: rgb(255, 255, 255);
1258
+ background-color: rgba(255, 255, 255, 0.5);
1259
+ padding: 10px;
1260
+ }
1261
+
1262
+ .aioseop_loading {
1263
+ background-image: url('../../images/activity.gif');
1264
+ display: inline-block;
1265
+ width: 24px;
1266
+ height: 24px;
1267
+ margin: 0;
1268
+ padding: 0;
1269
+ vertical-align: bottom;
1270
+ }
1271
+
1272
+ .aiosp_delete {
1273
+ background-image: url('../../images/delete.png');
1274
+ display: inline-block;
1275
+ width: 16px;
1276
+ height: 16px;
1277
+ margin: 0;
1278
+ padding: 0;
1279
+ vertical-align: bottom;
1280
+ }
1281
+
1282
+ form#aiosp_settings_form,
1283
+ .aioseop_tabs_div {
1284
+ padding-right: 477px;
1285
+ }
1286
+
1287
+ .aioseop_tabs_div {
1288
+ margin-top: 10px;
1289
+ }
1290
+
1291
+ #aiosp_settings_form ul.sfwd_debug_settings li strong {
1292
+ display: block;
1293
+ float: left;
1294
+ text-align: right;
1295
+ background-color: #DDD;
1296
+ margin-right: 8px;
1297
+ padding: 1px 8px 1px 1px;
1298
+ overflow: auto;
1299
+ width: 200px;
1300
+ min-height: 16px;
1301
+ }
1302
+
1303
+ #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong {
1304
+ background-color: #CCC;
1305
+ }
1306
+
1307
+ #aiosp_settings_form ul.sfwd_debug_settings li {
1308
+ clear: left;
1309
+ margin: 0;
1310
+ padding: 0;
1311
+ background-color: #EEE;
1312
+ overflow: auto;
1313
+ max-width: 75%;
1314
+ min-width: 800px;
1315
+ }
1316
+
1317
+ #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) {
1318
+ background-color: #DDD;
1319
+ }
1320
+
1321
+ div.sfwd_debug_mail_sent {
1322
+ background-color: #080;
1323
+ border: 1px solid #0A0;
1324
+ margin: 10px 0 10px 0;
1325
+ width: 598px;
1326
+ color: #FFF;
1327
+ text-align: center;
1328
+ }
1329
+
1330
+ div.sfwd_debug_error {
1331
+ background-color: #F00;
1332
+ color: #FFF;
1333
+ border: 1px solid #A00;
1334
+ margin: 10px 0 10px 0;
1335
+ width: 598px;
1336
+ text-align: center;
1337
+ font-weight: bolder;
1338
+ }
1339
+
1340
+ #aiosp_performance_status_wrapper .aioseop_option_div {
1341
+ max-height: 420px;
1342
+ }
1343
+
1344
+ #aioseop_coming_soon, #aioseop_coming_soon2 {
1345
+ padding-top: 40px;
1346
+ text-align: center;
1347
+ height: 258px;
1348
+ font-size: 16px;
1349
+ }
1350
+
1351
+ .MRL {
1352
+ margin-left: 20px !important;
1353
+ margin-bottom: 10px !important;
1354
+ }
1355
+
1356
+ /**
1357
+ * Edit Post screen specific styling
1358
+ *
1359
+ */
1360
+ .postbox-container .aioseop_option_div {
1361
+ width: 100%;
1362
+ }
1363
+
1364
+ .postbox-container .aioseop_option_div input[type="text"],
1365
+ .postbox-container .aioseop_option_div textarea {
1366
+ width: 99%;
1367
+ max-width: 900px;
1368
+ }
1369
+
1370
+ .postbox-container .aioseop_option_label {
1371
+ max-width: none;
1372
+ height: auto !important;
1373
+ }
1374
+
1375
+ .postbox-container .aioseop_wrapper {
1376
+ padding: 0;
1377
+ }
1378
+
1379
+ .postbox-container .aioseop_input {
1380
+ display: block;
1381
+ margin-bottom: 10px;
1382
+ padding: 0;
1383
+ }
1384
+
1385
+ .postbox-container .aioseop_option_input {
1386
+ width: 63%;
1387
+ padding: 0;
1388
+ }
1389
+
1390
+ .postbox-container div#aiosp_upgrade_wrapper {
1391
+ float: none;
1392
+ width: auto;
1393
+ margin: 0;
1394
+ padding: 0;
1395
+ }
1396
+
1397
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input {
1398
+ display: block;
1399
+ padding: 0;
1400
+ }
1401
+
1402
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input {
1403
+ float: none;
1404
+ width: auto;
1405
+ padding: 0;
1406
+ }
1407
+
1408
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div {
1409
+ width: auto;
1410
+ min-height: 0;
1411
+ padding: 10px 0;
1412
+ }
1413
+
1414
+ .aioseop_tabs .aioseop_options {
1415
+ margin: 0;
1416
+ }
1417
+
1418
+ #aioseop_opengraph_settings .aioseop_options {
1419
+ clear: both;
1420
+ margin-top: 35px;
1421
+ }
1422
+
1423
+ #aioseop_opengraph_settings .aioseop_option_input {
1424
+ width: 70%;
1425
+ }
1426
+
1427
+ /**
1428
+ * Preview Snippet styling
1429
+ *
1430
+ */
1431
+ div#aiosp_snippet_wrapper {
1432
+ border: 1px solid #888;
1433
+ clear: both;
1434
+ padding: 10px 10px 0;
1435
+ max-width: 97%;
1436
+ margin-bottom: 15px;
1437
+ }
1438
+
1439
+ div#aiosp_snippet_wrapper .aioseop_option_label {
1440
+ height: auto !important;
1441
+ }
1442
+
1443
+ div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input {
1444
+ margin: 0;
1445
+ }
1446
+
1447
+ div#aioseop_snippet {
1448
+ font-family: arial, sans-serif;
1449
+ font-size: 13px;
1450
+ }
1451
+
1452
+ div#aioseop_snippet > h3 {
1453
+ margin: 10px 0 5px;
1454
+ font-size: 18px;
1455
+ border: 0;
1456
+ background: inherit;
1457
+ font-weight: normal;
1458
+ }
1459
+
1460
+ div#aioseop_snippet > h3 > a {
1461
+ color: #12c;
1462
+ text-decoration: none;
1463
+ cursor: pointer;
1464
+ }
1465
+
1466
+ div#aioseop_snippet > div {
1467
+ color: #545454;
1468
+ max-width: 48em;
1469
+ }
1470
+
1471
+ div#aioseop_snippet > div > div {
1472
+ display: block;
1473
+ margin-bottom: 1px;
1474
+ }
1475
+
1476
+ div#aioseop_snippet > div > div > cite {
1477
+ color: #093;
1478
+ font-style: normal;
1479
+ }
1480
+
1481
+ div#aioseop_snippet > div > span {
1482
+ margin: 0;
1483
+ padding: 0;
1484
+ border: 0;
1485
+ }
1486
+
1487
+ /* the good, the bad and the ugly character counts */
1488
+ .aioseop_count_good {
1489
+ color: #515151 !important;
1490
+ background-color: #eee !important;
1491
+ }
1492
+ .aioseop_count_bad {
1493
+ color: #515151 !important;
1494
+ background-color: #ff0 !important;
1495
+ }
1496
+ .aioseop_count_ugly {
1497
+ color: #fff !important;
1498
+ background-color: #f00 !important;
1499
+ }
1500
+
1501
+ textarea.robots-text {
1502
+ background-color: #eee;
1503
+ width: 100%;
1504
+ height: 100%;
1505
+ }
1506
+
1507
+ div#aiosp_sitemap_status_metabox .toggle-indicator {
1508
+ display:none;
1509
  }
inc/aioseop_functions.php CHANGED
@@ -420,10 +420,6 @@ function aioseop_embed_handler_html( $return, $url, $attr ) {
420
  return AIO_ProGeneral::aioseop_embed_handler_html();
421
  }
422
 
423
- function aioseop_ajax_update_oembed() {
424
- AIO_ProGeneral::aioseop_ajax_update_oembed();
425
- }
426
-
427
  if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
428
 
429
  function aioseop_ajax_save_url() {
@@ -880,6 +876,13 @@ if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
880
 
881
  if ( ! function_exists( 'aioseop_localize_script_data' ) ) {
882
 
 
 
 
 
 
 
 
883
  function aioseop_localize_script_data() {
884
  static $loaded = 0;
885
  if ( ! $loaded ) {
420
  return AIO_ProGeneral::aioseop_embed_handler_html();
421
  }
422
 
 
 
 
 
423
  if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
424
 
425
  function aioseop_ajax_save_url() {
876
 
877
  if ( ! function_exists( 'aioseop_localize_script_data' ) ) {
878
 
879
+ /**
880
+ * AIOSEOP Localize Script Data
881
+ *
882
+ * Used by the module base class script enqueue to localize data.
883
+ *
884
+ * @since ?
885
+ */
886
  function aioseop_localize_script_data() {
887
  static $loaded = 0;
888
  if ( ! $loaded ) {
inc/aioseop_updates_class.php CHANGED
@@ -114,6 +114,13 @@ class AIOSEOP_Updates {
114
  set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
115
  }
116
 
 
 
 
 
 
 
 
117
  }
118
 
119
  /**
@@ -193,6 +200,30 @@ class AIOSEOP_Updates {
193
  }
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  /**
197
  * Updates features.
198
  *
114
  set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
115
  }
116
 
117
+ if (
118
+ ( ! AIOSEOPPRO && version_compare( $old_version, '2.9', '<' ) ) ||
119
+ ( AIOSEOPPRO && version_compare( $old_version, '2.10', '<' ) )
120
+ ) {
121
+ $this->bad_bots_remove_semrush_201810();
122
+ }
123
+
124
  }
125
 
126
  /**
200
  }
201
  }
202
 
203
+ /**
204
+ * Removes semrush from bad bot blocker.
205
+ *
206
+ * @since 2.9
207
+ * @global @aiosp, @aioseop_options
208
+ */
209
+ function bad_bots_remove_semrush_201810(){
210
+ global $aiosp, $aioseop_options;
211
+
212
+ // Remove 'SemrushBot' from bad bots list to avoid false positives.
213
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
214
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
215
+ $list = str_replace(
216
+ array(
217
+ "SemrushBot\r\n",
218
+ "SemrushBot\n",
219
+ ), '', $list
220
+ );
221
+ $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
222
+ update_option( 'aioseop_options', $aioseop_options );
223
+ $aiosp->update_class_option( $aioseop_options );
224
+ }
225
+ }
226
+
227
  /**
228
  * Updates features.
229
  *
inc/aiosp_common.php CHANGED
@@ -14,6 +14,18 @@
14
  class aiosp_common {
15
  // @codingStandardsIgnoreEnd
16
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /**
18
  * aiosp_common constructor.
19
  *
@@ -159,6 +171,383 @@ class aiosp_common {
159
  return $url;
160
  }
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  /**
163
  * Check whether a url is valid.
164
  *
14
  class aiosp_common {
15
  // @codingStandardsIgnoreEnd
16
 
17
+ /**
18
+ * The allowed image extensions.
19
+ *
20
+ * @var array $image_extensions The allowed image extensions.
21
+ */
22
+ private static $image_extensions = array(
23
+ 'jpg',
24
+ 'jpeg',
25
+ 'png',
26
+ 'gif',
27
+ );
28
+
29
  /**
30
  * aiosp_common constructor.
31
  *
171
  return $url;
172
  }
173
 
174
+ /**
175
+ * Determines if the given image URL is an attachment and, if it is, gets the correct image URL according to the requested size.
176
+ *
177
+ * @param string $url The url of the image.
178
+ * @param string $size The size of the image to return.
179
+ *
180
+ * @return string
181
+ */
182
+ public static function get_image_src_for_url( $url, $size = 'thumbnail' ) {
183
+ // let's check if this image is an attachment.
184
+ $dir = wp_get_upload_dir();
185
+ $path = $url;
186
+
187
+ $site_url = parse_url( $dir['url'] );
188
+ $image_path = parse_url( $path );
189
+
190
+ //force the protocols to match if needed
191
+ if ( isset( $image_path['scheme'] ) && ( $image_path['scheme'] !== $site_url['scheme'] ) ) {
192
+ $path = str_replace( $image_path['scheme'], $site_url['scheme'], $path );
193
+ }
194
+
195
+ if ( 0 === strpos( $path, $dir['baseurl'] . '/' ) ) {
196
+ $path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
197
+ }
198
+
199
+
200
+ global $wpdb;
201
+ $attachment_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE %s", '%' . basename( $path ) . '%' ) );
202
+
203
+ if ( $attachment_id ) {
204
+ $size = apply_filters( 'aioseop_attachment_size', apply_filters( 'aioseop_thumbnail_size', apply_filters( 'post_thumbnail_size', $size ) ) );
205
+ // if this is a valid attachment, get the correct size.
206
+ $image = wp_get_attachment_image_src( $attachment_id, $size );
207
+ if ( $image ) {
208
+ $url = $image[0];
209
+ }
210
+ }
211
+
212
+ return $url;
213
+ }
214
+
215
+ /**
216
+ * Fetch images from WP, Jetpack and WooCommerce galleries.
217
+ *
218
+ * @param string $post The post.
219
+ * @param array $images the array of images.
220
+ *
221
+ * @return void
222
+ * @since 2.4.2
223
+ */
224
+ public static function get_gallery_images( $post, &$images ) {
225
+ if ( false === apply_filters( 'aioseo_include_images_in_wp_gallery', true ) ) {
226
+ return;
227
+ }
228
+
229
+ // Check images galleries in the content. DO NOT run the_content filter here as it might cause issues with other shortcodes.
230
+ if ( has_shortcode( $post->post_content, 'gallery' ) ) {
231
+ // Get the jetpack gallery images.
232
+ if ( class_exists( 'Jetpack_PostImages' ) ) {
233
+ // the method specifies default width and height so we need to provide these values to override the defaults.
234
+ // since there is no way to determine the original image's dimensions, we will fetch the 'large' size image here.
235
+ $jetpack = Jetpack_PostImages::get_images( $post->ID, self::get_dimensions_for_image_size( 'large' ) );
236
+ if ( $jetpack ) {
237
+ foreach ( $jetpack as $jetpack_image ) {
238
+ $images[] = $jetpack_image['src'];
239
+ }
240
+ }
241
+ }
242
+
243
+ // Get the default WP gallery images.
244
+ $galleries = get_post_galleries( $post, false );
245
+ if ( $galleries ) {
246
+ foreach ( $galleries as $gallery ) {
247
+ $images = array_merge( $images, $gallery['src'] );
248
+ }
249
+ }
250
+ }
251
+
252
+ // Check WooCommerce product gallery.
253
+ if ( class_exists( 'WooCommerce' ) ) {
254
+ $woo_images = get_post_meta( $post->ID, '_product_image_gallery', true );
255
+ if ( ! empty( $woo_images ) ) {
256
+ $woo_images = array_filter( explode( ',', $woo_images ) );
257
+ if ( is_array( $woo_images ) ) {
258
+ foreach ( $woo_images as $id ) {
259
+ $images[] = wp_get_attachment_url( $id );
260
+ }
261
+ }
262
+ }
263
+ }
264
+
265
+ $images = array_unique( $images );
266
+ }
267
+
268
+ /**
269
+ * Fetch the width and height for the specified image size.
270
+ *
271
+ * @param string $size The image size e.g. 'large', 'medium' etc.
272
+ *
273
+ * @since 2.4.3
274
+ */
275
+ private function get_dimensions_for_image_size( $size ) {
276
+ $sizes = get_intermediate_image_sizes();
277
+ if ( ! in_array( $size, $sizes, true ) ) {
278
+ // our specified size does not exist in the registered sizes, so let's use the largest one available.
279
+ $size = end( $sizes );
280
+ }
281
+
282
+ if ( $size ) {
283
+ return array(
284
+ 'width' => get_option( "{$size}_size_w" ),
285
+ 'height' => get_option( "{$size}_size_h" ),
286
+ );
287
+ }
288
+ return null;
289
+ }
290
+
291
+ /**
292
+ * Parses the content to find out if specified images galleries exist and if they do, parse them for images.
293
+ * Supports NextGen.
294
+ *
295
+ * @param string $content The post content.
296
+ *
297
+ * @since 2.4.2
298
+ *
299
+ * @return string
300
+ */
301
+ public static function get_content_from_galleries( $content ) {
302
+ // Support for NextGen Gallery.
303
+ static $gallery_types = array( 'ngg_images' );
304
+ $types = apply_filters( 'aioseop_gallery_shortcodes', $gallery_types );
305
+
306
+ $gallery_content = '';
307
+
308
+ if ( ! $types ) {
309
+ return $gallery_content;
310
+ }
311
+
312
+ $found = array();
313
+ if ( $types ) {
314
+ foreach ( $types as $type ) {
315
+ if ( has_shortcode( $content, $type ) ) {
316
+ $found[] = $type;
317
+ }
318
+ }
319
+ }
320
+
321
+ // If none of the shortcodes-of-interest are found, bail.
322
+ if ( empty( $found ) ) {
323
+ return $gallery_content;
324
+ }
325
+
326
+ $galleries = array();
327
+
328
+ if ( ! preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) ) {
329
+ return $gallery_content;
330
+ }
331
+
332
+ // Collect the shortcodes and their attributes.
333
+ foreach ( $found as $type ) {
334
+ foreach ( $matches as $shortcode ) {
335
+ if ( $type === $shortcode[2] ) {
336
+
337
+ $attributes = shortcode_parse_atts( $shortcode[3] );
338
+
339
+ if ( '' === $attributes ) { // Valid shortcode without any attributes.
340
+ $attributes = array();
341
+ }
342
+
343
+ $galleries[ $shortcode[2] ] = $attributes;
344
+ }
345
+ }
346
+ }
347
+
348
+ // Recreate the shortcodes and then render them to get the HTML content.
349
+ if ( $galleries ) {
350
+ foreach ( $galleries as $shortcode => $attributes ) {
351
+ $code = '[' . $shortcode;
352
+ foreach ( $attributes as $key => $value ) {
353
+ $code .= " $key=$value";
354
+ }
355
+ $code .= ']';
356
+ $gallery_content .= do_shortcode( $code );
357
+ }
358
+ }
359
+
360
+ return $gallery_content;
361
+ }
362
+
363
+ /**
364
+ * Parses the content of the post provided for images and galleries.
365
+ *
366
+ * @param WP_Post $post The post to parse.
367
+ * @return array
368
+ */
369
+ public static function parse_content_for_images( WP_Post $post ) {
370
+ $images = array();
371
+ $content = $post->post_content;
372
+
373
+ self::get_gallery_images( $post, $images );
374
+
375
+ $content .= self::get_content_from_galleries( $content );
376
+
377
+ self::parse_dom_for_images( $content, $images );
378
+
379
+ return $images;
380
+ }
381
+
382
+ /**
383
+ * Parse the post for images.
384
+ *
385
+ * @param string $content the post content.
386
+ * @param array $images the array of images.
387
+ *
388
+ * @return void
389
+ */
390
+ public static function parse_dom_for_images( $content, &$images ) {
391
+ // These tags should be WITHOUT trailing space because some plugins such as the nextgen gallery put newlines immediately after <img.
392
+ $total = substr_count( $content, '<img' ) + substr_count( $content, '<IMG' );
393
+ // no images found.
394
+ if ( 0 === $total ) {
395
+ return;
396
+ }
397
+
398
+ if ( class_exists( 'DOMDocument' ) ) {
399
+ $dom = new domDocument();
400
+ // Non-compliant HTML might give errors, so ignore them.
401
+ libxml_use_internal_errors( true );
402
+ $dom->loadHTML( $content );
403
+ libxml_clear_errors();
404
+ $dom->preserveWhiteSpace = false;
405
+ $matches = $dom->getElementsByTagName( 'img' );
406
+ foreach ( $matches as $match ) {
407
+ $images[] = $match->getAttribute( 'src' );
408
+ }
409
+ } else {
410
+ // Fall back to regex, but also report an error.
411
+ global $img_err_msg;
412
+ if ( ! isset( $img_err_msg ) ) {
413
+ // we will log this error message only once, not per post.
414
+ $img_err_msg = true;
415
+ aiosp_log( 'DOMDocument not found; using REGEX' );
416
+ }
417
+ preg_match_all( '/<img.*src=([\'"])?(.*?)\\1/', $content, $matches );
418
+ if ( $matches && isset( $matches[2] ) ) {
419
+ $images = array_merge( $images, $matches[2] );
420
+ }
421
+ }
422
+ }
423
+
424
+ /**
425
+ * Fetch image attributes such as title and caption given the image URL.
426
+ *
427
+ * @param string $url The image URL.
428
+ */
429
+ public static function get_image_attributes( $url ) {
430
+ $attributes = array();
431
+ global $wpdb;
432
+ $attachment = $wpdb->get_col( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $url ) );
433
+ if ( $attachment && is_array( $attachment ) && is_numeric( $attachment[0] ) ) {
434
+ $attributes = array(
435
+ 'image:caption' => self::get_image_caption( $attachment[0] ),
436
+ 'image:title' => get_the_title( $attachment[0] ),
437
+ );
438
+ }
439
+ return $attributes;
440
+ }
441
+
442
+ /**
443
+ * Wrapper around `wp_get_attachment_caption` because it was introduced only in WP 4.6.0.
444
+ *
445
+ * @param int $attachment_id The attachment ID.
446
+ */
447
+ public static function get_image_caption( $attachment_id ) {
448
+ global $wp_version;
449
+ if ( version_compare( $wp_version, '4.6.0', '<' ) ) {
450
+ $post_id = (int) $attachment_id;
451
+ if ( ! $post = get_post( $post_id ) ) {
452
+ return false;
453
+ }
454
+
455
+ if ( 'attachment' !== $post->post_type ) {
456
+ return false;
457
+ }
458
+
459
+ $caption = $post->post_excerpt;
460
+ return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );
461
+ }
462
+
463
+ return wp_get_attachment_caption( $attachment_id );
464
+ }
465
+
466
+ /**
467
+ * Cleans the URL so that its acceptable in the sitemap.
468
+ *
469
+ * @param string $url The image url.
470
+ *
471
+ * @since 2.4.1
472
+ *
473
+ * @return string
474
+ */
475
+ public static function clean_url( $url ) {
476
+ // remove the query string.
477
+ $url = strtok( $url, '?' );
478
+ // make the url XML-safe.
479
+ $url = htmlspecialchars( $url );
480
+ // Make the url absolute, if its relative.
481
+ $url = aiosp_common::absolutize_url( $url );
482
+ return apply_filters( 'aioseop_clean_url', $url );
483
+ }
484
+
485
+ /**
486
+ * Validate the image.
487
+ * NOTE: We will use parse_url here instead of wp_parse_url as we will correct the URLs beforehand and
488
+ * this saves us the need to check PHP version support.
489
+ *
490
+ * @param string $image The image src.
491
+ *
492
+ * @since 2.4.1
493
+ * @since 2.4.3 Compatibility with Pre v4.7 wp_parse_url().
494
+ *
495
+ * @return bool
496
+ */
497
+ public static function is_image_valid( $image ) {
498
+ global $wp_version;
499
+
500
+ // Bail if empty image.
501
+ if ( empty( $image ) ) {
502
+ return false;
503
+ }
504
+
505
+ global $wp_version;
506
+ if ( version_compare( $wp_version, '4.4', '<' ) ) {
507
+ $p_url = parse_url( $image );
508
+ $url = $p_url['scheme'] . $p_url['host'] . $p_url['path'];
509
+ } elseif ( version_compare( $wp_version, '4.7', '<' ) ) {
510
+ // Compatability for older WP version that don't have 4.7 changes.
511
+ // @link https://core.trac.wordpress.org/changeset/38726
512
+ $p_url = wp_parse_url( $image );
513
+ $url = $p_url['scheme'] . $p_url['host'] . $p_url['path'];
514
+ } else {
515
+ $component = PHP_URL_PATH;
516
+ $url = wp_parse_url( $image, $component );
517
+ }
518
+
519
+ // make the url absolute, if its relative.
520
+ $image = aiosp_common::absolutize_url( $image );
521
+
522
+ $extn = pathinfo( parse_url( $image, PHP_URL_PATH ), PATHINFO_EXTENSION );
523
+ $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
524
+ // Bail if image does not refer to an image file otherwise google webmaster tools might reject the sitemap.
525
+ if ( ! in_array( $extn, $allowed, true ) ) {
526
+ return false;
527
+ }
528
+
529
+ $image_host = parse_url( $image, PHP_URL_HOST );
530
+ $host = parse_url( home_url(), PHP_URL_HOST );
531
+
532
+ if ( $image_host !== $host ) {
533
+ // Allowed hosts will be provided in a wildcard format i.e. img.yahoo.* or *.akamai.*.
534
+ // And we will convert that into a regular expression for matching.
535
+ $whitelist = apply_filters( 'aioseop_images_allowed_from_hosts', array() );
536
+ $allowed = false;
537
+ if ( $whitelist ) {
538
+ foreach ( $whitelist as $pattern ) {
539
+ if ( preg_match( '/' . str_replace( '*', '.*', $pattern ) . '/', $image_host ) === 1 ) {
540
+ $allowed = true;
541
+ break;
542
+ }
543
+ }
544
+ }
545
+ return $allowed;
546
+
547
+ }
548
+ return true;
549
+ }
550
+
551
  /**
552
  * Check whether a url is valid.
553
  *
inc/commonstrings.php CHANGED
@@ -20,16 +20,10 @@ class AIOSP_Common_Strings {
20
  // Video sitemap strings.
21
  __( 'Video Sitemap', 'all-in-one-seo-pack' );
22
  __( 'Show Only Posts With Videos', 'all-in-one-seo-pack' );
23
- __( 'Scan Posts For Videos', 'all-in-one-seo-pack' );
24
  __( 'Restrict Access to Video Sitemap', 'all-in-one-seo-pack' );
25
- __( 'Press the Scan button to scan your posts for videos! Do this if video content from a post or posts is not showing up in your sitemap.', 'all-in-one-seo-pack' );
26
  __( 'If checked, only posts that have videos in them will be displayed on the sitemap.', 'all-in-one-seo-pack' );
27
  __( 'Enable this option to only allow access to your sitemap by site administrators and major search engines.', 'all-in-one-seo-pack' );
28
  __( 'You do not have access to this page; try logging in as an administrator.', 'all-in-one-seo-pack' );
29
- __( 'Scan', 'all-in-one-seo-pack' );
30
-
31
- // These are functions_class strings.
32
- __( 'Finished scanning posts', 'all-in-one-seo-pack' );
33
 
34
  // Update checker strings (incomplete... need to separate out html).
35
  __( 'Purchase one now', 'all-in-one-seo-pack' );
20
  // Video sitemap strings.
21
  __( 'Video Sitemap', 'all-in-one-seo-pack' );
22
  __( 'Show Only Posts With Videos', 'all-in-one-seo-pack' );
 
23
  __( 'Restrict Access to Video Sitemap', 'all-in-one-seo-pack' );
 
24
  __( 'If checked, only posts that have videos in them will be displayed on the sitemap.', 'all-in-one-seo-pack' );
25
  __( 'Enable this option to only allow access to your sitemap by site administrators and major search engines.', 'all-in-one-seo-pack' );
26
  __( 'You do not have access to this page; try logging in as an administrator.', 'all-in-one-seo-pack' );
 
 
 
 
27
 
28
  // Update checker strings (incomplete... need to separate out html).
29
  __( 'Purchase one now', 'all-in-one-seo-pack' );
js/modules/aioseop_module.js CHANGED
@@ -283,34 +283,6 @@ jQuery( document ).ready(
283
  }
284
  );
285
 
286
- /**
287
- * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged.
288
- *
289
- * props to commentluv for this fix
290
- * @author commentluv.
291
- * @link https://core.trac.wordpress.org/ticket/16972
292
- * @since 1.0.0
293
- */
294
- jQuery(document).ready(
295
- function () {
296
- // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag
297
- jQuery('.hndle').mousedown(
298
- function () {
299
-
300
- // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function
301
- jQuery('.wrap').mouseup(
302
- function () {
303
- aiosp_store_radio();
304
- setTimeout(function () {
305
- aiosp_reclick_radio();
306
- }, 50);
307
- }
308
- );
309
- }
310
- );
311
- }
312
- );
313
-
314
  /**
315
  * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin.
316
  *
@@ -629,6 +601,19 @@ jQuery( document ).ready(
629
  }
630
  );
631
 
 
 
 
 
 
 
 
 
 
 
 
 
 
632
  jQuery( "a.aiosp_robots_physical" ).on( 'click', function( e ) {
633
  e.preventDefault();
634
  aioseop_handle_post_url(
@@ -884,4 +869,4 @@ function aiospinitCounting(){
884
  jQuery( '.aioseop_count_chars' ).each(function(){
885
  countChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0));
886
  });
887
- }
283
  }
284
  );
285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  /**
287
  * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin.
288
  *
601
  }
602
  );
603
 
604
+ jQuery( "div#aiosp_robots_default_metabox" )
605
+ .delegate(
606
+ "a.aiosp_robots_edit_rule", "click", function( e ) {
607
+ e.preventDefault();
608
+ jQuery('input[name="aiosp_robots_agent"]').val(jQuery(this).attr('data-agent'));
609
+ jQuery('select[name="aiosp_robots_type"]').val(jQuery(this).attr('data-type'));
610
+ jQuery('input[name="aiosp_robots_path"]').val(jQuery(this).attr('data-path'));
611
+ jQuery('input.add-edit-rule').val(jQuery('.aioseop_table').attr('data-edit-label'));
612
+ jQuery('input.edit-rule-id').val(jQuery(this).attr('data-id'));
613
+ return false;
614
+ }
615
+ );
616
+
617
  jQuery( "a.aiosp_robots_physical" ).on( 'click', function( e ) {
618
  e.preventDefault();
619
  aioseop_handle_post_url(
869
  jQuery( '.aioseop_count_chars' ).each(function(){
870
  countChars( jQuery(this).eq(0), jQuery(this).parent().find('[name="' + jQuery(this).attr('data-length-field') + '"]').eq(0));
871
  });
872
+ }
modules/aioseop_feature_manager.php CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
48
  'file_editor' => array(
49
  /* translators: the File Editor module allows users to edit the robots.txt file or .htaccess file on their site. */
50
  'name' => __( 'File Editor', 'all-in-one-seo-pack' ),
51
- 'description' => __( 'Edit your your .htaccess file to fine-tune your site.', 'all-in-one-seo-pack' ),
52
  ),
53
  'importer_exporter' => array(
54
  /* translators: the Importer & Exporter module allows users to import/export their All in One SEO Pack
48
  'file_editor' => array(
49
  /* translators: the File Editor module allows users to edit the robots.txt file or .htaccess file on their site. */
50
  'name' => __( 'File Editor', 'all-in-one-seo-pack' ),
51
+ 'description' => __( 'Edit your .htaccess file to fine-tune your site.', 'all-in-one-seo-pack' ),
52
  ),
53
  'importer_exporter' => array(
54
  /* translators: the Importer & Exporter module allows users to import/export their All in One SEO Pack
modules/aioseop_opengraph.php CHANGED
@@ -1,1744 +1,1758 @@
1
- <?php
2
- /**
3
- * The Opengraph class.
4
- *
5
- * @package All-in-One-SEO-Pack
6
- * @version 2.3.16
7
- */
8
- if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
9
- class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
10
- var $fb_object_types;
11
- var $type;
12
-
13
- /**
14
- * Module constructor.
15
- *
16
- * @since 2.3.14 Added display filter.
17
- * @since 2.3.16 #1066 Force init on constructor.
18
- */
19
- function __construct() {
20
- add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
21
-
22
- $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
23
- $this->prefix = 'aiosp_opengraph_'; // option prefix
24
- $this->file = __FILE__; // the current file
25
- $this->fb_object_types = array(
26
- 'Activities' => array(
27
- 'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
28
- 'sport' => __( 'Sport', 'all-in-one-seo-pack' ),
29
- ),
30
- 'Businesses' => array(
31
- 'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
32
- 'company' => __( 'Company', 'all-in-one-seo-pack' ),
33
- 'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
34
- 'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
35
- 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' ),
36
- ),
37
- 'Groups' => array(
38
- 'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
39
- 'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
40
- 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' ),
41
- ),
42
- 'Organizations' => array(
43
- 'band' => __( 'Band', 'all-in-one-seo-pack' ),
44
- 'government' => __( 'Government', 'all-in-one-seo-pack' ),
45
- 'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
46
- 'school' => __( 'School', 'all-in-one-seo-pack' ),
47
- 'university' => __( 'University', 'all-in-one-seo-pack' ),
48
- ),
49
- 'People' => array(
50
- 'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
51
- 'athlete' => __( 'Athlete', 'all-in-one-seo-pack' ),
52
- 'author' => __( 'Author', 'all-in-one-seo-pack' ),
53
- 'director' => __( 'Director', 'all-in-one-seo-pack' ),
54
- 'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
55
- 'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
56
- 'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
57
- 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' ),
58
- ),
59
- 'Places' => array(
60
- 'city' => __( 'City', 'all-in-one-seo-pack' ),
61
- 'country' => __( 'Country', 'all-in-one-seo-pack' ),
62
- 'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
63
- 'state_province' => __( 'State Province', 'all-in-one-seo-pack' ),
64
- ),
65
- 'Products and Entertainment' => array(
66
- 'album' => __( 'Album', 'all-in-one-seo-pack' ),
67
- 'book' => __( 'Book', 'all-in-one-seo-pack' ),
68
- 'drink' => __( 'Drink', 'all-in-one-seo-pack' ),
69
- 'food' => __( 'Food', 'all-in-one-seo-pack' ),
70
- 'game' => __( 'Game', 'all-in-one-seo-pack' ),
71
- 'movie' => __( 'Movie', 'all-in-one-seo-pack' ),
72
- 'product' => __( 'Product', 'all-in-one-seo-pack' ),
73
- 'song' => __( 'Song', 'all-in-one-seo-pack' ),
74
- 'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
75
- 'episode' => __( 'Episode', 'all-in-one-seo-pack' ),
76
- ),
77
- 'Websites' => array(
78
- 'article' => __( 'Article', 'all-in-one-seo-pack' ),
79
- 'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
80
- 'website' => __( 'Website', 'all-in-one-seo-pack' ),
81
- ),
82
- );
83
- parent::__construct();
84
-
85
- $this->help_text = array(
86
- 'setmeta' => __( 'Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.', 'all-in-one-seo-pack' ),
87
- 'key' => __( 'Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/', 'all-in-one-seo-pack' ),
88
- 'appid' => __( 'Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register', 'all-in-one-seo-pack' ),
89
- 'title_shortcodes' => __( 'Run shortcodes that appear in social title meta tags.', 'all-in-one-seo-pack' ),
90
- 'description_shortcodes' => __( 'Run shortcodes that appear in social description meta tags.', 'all-in-one-seo-pack' ),
91
- 'sitename' => __( 'The Site Name is the name that is used to identify your website.', 'all-in-one-seo-pack' ),
92
- 'hometitle' => __( 'The Home Title is the Open Graph title for your home page.', 'all-in-one-seo-pack' ),
93
- 'description' => __( 'The Home Description is the Open Graph description for your home page.', 'all-in-one-seo-pack' ),
94
- 'homeimage' => __( 'The Home Image is the Open Graph image for your home page.', 'all-in-one-seo-pack' ),
95
- 'generate_descriptions' => __( 'This option will auto generate your Open Graph descriptions from your post content instead of your post excerpt. WooCommerce users should read the documentation regarding this setting.', 'all-in-one-seo-pack' ),
96
- 'defimg' => __( 'This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.', 'all-in-one-seo-pack' ),
97
- 'fallback' => __( 'This option lets you fall back to the default image if no image could be found above.', 'all-in-one-seo-pack' ),
98
- 'dimg' => __( 'This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.', 'all-in-one-seo-pack' ),
99
- 'dimgwidth' => __( 'This option lets you set a default width for your images, where unspecified.', 'all-in-one-seo-pack' ),
100
- 'dimgheight' => __( 'This option lets you set a default height for your images, where unspecified.', 'all-in-one-seo-pack' ),
101
- 'meta_key' => __( 'Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.', 'all-in-one-seo-pack' ),
102
- 'image' => __( 'This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.', 'all-in-one-seo-pack' ),
103
- 'customimg' => __( 'This option lets you upload an image to use as the Open Graph image for this Page or Post.', 'all-in-one-seo-pack' ),
104
- 'imagewidth' => __( 'Enter the width for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
105
- 'imageheight' => __( 'Enter the height for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
106
- 'video' => __( 'This option lets you specify a link to the Open Graph video used on this Page or Post.', 'all-in-one-seo-pack' ),
107
- 'videowidth' => __( 'Enter the width for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
108
- 'videoheight' => __( 'Enter the height for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
109
- 'defcard' => __( 'Select the default type of Twitter Card to display.', 'all-in-one-seo-pack' ),
110
- 'setcard' => __( 'Select the Twitter Card type to use for this Page or Post, overriding the default setting.', 'all-in-one-seo-pack' ),
111
- 'twitter_site' => __( 'Enter the Twitter username associated with your website here.', 'all-in-one-seo-pack' ),
112
- 'twitter_creator' => __( 'Allows your authors to be identified by their Twitter usernames as content creators on the Twitter cards for their posts.', 'all-in-one-seo-pack' ),
113
- 'twitter_domain' => __( 'Enter the name of your website here.', 'all-in-one-seo-pack' ),
114
- 'customimg_twitter' => __( 'This option lets you upload an image to use as the Twitter image for this Page or Post.', 'all-in-one-seo-pack' ),
115
- 'gen_tags' => __( 'Automatically generate article tags for Facebook type article when not provided.', 'all-in-one-seo-pack' ),
116
- 'gen_keywords' => __( 'Use keywords in generated article tags.', 'all-in-one-seo-pack' ),
117
- 'gen_categories' => __( 'Use categories in generated article tags.', 'all-in-one-seo-pack' ),
118
- 'gen_post_tags' => __( 'Use post tags in generated article tags.', 'all-in-one-seo-pack' ),
119
- 'types' => __( 'Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.', 'all-in-one-seo-pack' ),
120
- 'title' => __( 'This is the Open Graph title of this Page or Post.', 'all-in-one-seo-pack' ),
121
- 'desc' => __( 'This is the Open Graph description of this Page or Post.', 'all-in-one-seo-pack' ),
122
- 'category' => __( 'Select the Open Graph type that best describes the content of this Page or Post.', 'all-in-one-seo-pack' ),
123
- 'facebook_debug' => __( 'Press this button to have Facebook re-fetch and debug this page.', 'all-in-one-seo-pack' ),
124
- 'section' => __( 'This Open Graph meta allows you to add a general section name that best describes this content.', 'all-in-one-seo-pack' ),
125
- 'tag' => __( 'This Open Graph meta allows you to add a list of keywords that best describe this content.', 'all-in-one-seo-pack' ),
126
- 'facebook_publisher' => __( 'Link articles to the Facebook page associated with your website.', 'all-in-one-seo-pack' ),
127
- 'facebook_author' => __( 'Allows your authors to be identified by their Facebook pages as content authors on the Opengraph meta for their articles.', 'all-in-one-seo-pack' ),
128
- 'person_or_org' => __( 'Are the social profile links for your website for a person or an organization?', 'all-in-one-seo-pack' ),
129
- 'profile_links' => __( "Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack' ),
130
- 'social_name' => __( 'Add the name of the person or organization who owns these profiles.', 'all-in-one-seo-pack' ),
131
- );
132
-
133
- $this->help_anchors = array(
134
- 'title_shortcodes' => '#run-shortcodes-in-title',
135
- 'description_shortcodes' => '#run-shortcodes-in-description',
136
- 'generate_descriptions' => '#auto-generate-og-descriptions',
137
- 'setmeta' => '#use-aioseo-title-and-description',
138
- 'sitename' => '#site-name',
139
- 'hometitle' => '#home-title-and-description',
140
- 'description' => '#home-title-and-description',
141
- 'homeimage' => '#home-image',
142
- 'defimg' => '#select-og-image-source',
143
- 'fallback' => '#use-default-if-no-image-found',
144
- 'dimg' => '#default-og-image',
145
- 'dimgwidth' => '#default-image-width',
146
- 'dimgheight' => '#default-image-height',
147
- 'meta_key' => '#use-custom-field-for-image',
148
- 'profile_links' => '#social-profile-links',
149
- 'person_or_org' => '#social-profile-links',
150
- 'social_name' => '#social-profile-links',
151
- 'key' => '#facebook-admin-id',
152
- 'appid' => '#facebook-app-id',
153
- 'gen_tags' => '#automatically-generate-article-tags',
154
- 'gen_keywords' => '#use-keywords-in-article-tags',
155
- 'gen_categories' => '#use-categories-in-article-tags',
156
- 'gen_post_tags' => '#use-post-tags-in-article-tags',
157
- 'facebook_publisher' => '#show-facebook-publisher-on-articles',
158
- 'facebook_author' => '#show-facebook-author-on-articles',
159
- 'types' => '#enable-facebook-meta-for',
160
- 'defcard' => '#default-twitter-card',
161
- 'twitter_site' => '#twitter-site',
162
- 'twitter_creator' => '#show-twitter-author',
163
- 'twitter_domain' => '#twitter-domain',
164
- 'scan_header' => '#scan-social-meta',
165
- 'title' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#title',
166
- 'desc' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#description',
167
- 'image' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#image',
168
- 'customimg' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-image',
169
- 'imagewidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
170
- 'imageheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
171
- 'video' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-video',
172
- 'videowidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
173
- 'videoheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
174
- 'category' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-object-type',
175
- 'facebook_debug' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-debug',
176
- 'section' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-section',
177
- 'tag' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-tags',
178
- 'setcard' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#twitter-card-type',
179
- 'customimg_twitter' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-twitter-image',
180
- );
181
-
182
- if ( is_admin() ) {
183
- add_action( 'admin_init', array( $this, 'admin_init' ), 5 );
184
- } else {
185
- add_action( 'wp', array( $this, 'type_setup' ) );
186
- }
187
-
188
- if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
189
- $this->do_opengraph();
190
- }
191
- // Set variables after WordPress load.
192
- add_action( 'init', array( &$this, 'init' ), 999999 );
193
- add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
194
- // Force refresh of Facebook cache.
195
- add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
196
- add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
197
- add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
198
- // Adds special filters
199
- add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
200
- // Call to init to generate menus
201
- $this->init();
202
- }
203
-
204
- /**
205
- * Hook called after WordPress has been loaded.
206
- *
207
- * @since 2.4.14
208
- */
209
- public function init() {
210
- $count_desc = __( ' characters. Open Graph allows up to a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
211
- // Create default options
212
- $this->default_options = array(
213
- 'scan_header' => array(
214
- 'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
215
- 'type' => 'custom',
216
- 'save' => true,
217
- ),
218
- 'setmeta' => array(
219
- 'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
220
- 'type' => 'checkbox',
221
- ),
222
- 'key' => array(
223
- 'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
224
- 'default' => '',
225
- 'type' => 'text',
226
- ),
227
- 'appid' => array(
228
- 'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
229
- 'default' => '',
230
- 'type' => 'text',
231
- ),
232
- 'title_shortcodes' => array(
233
- 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ),
234
- ),
235
- 'description_shortcodes' => array(
236
- 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ),
237
- ),
238
- 'sitename' => array(
239
- 'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
240
- 'default' => get_bloginfo( 'name' ),
241
- 'type' => 'text',
242
- ),
243
- 'hometitle' => array(
244
- 'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
245
- 'default' => '',
246
- 'type' => 'textarea',
247
- 'condshow' => array(
248
- 'aiosp_opengraph_setmeta' => array(
249
- 'lhs' => 'aiosp_opengraph_setmeta',
250
- 'op' => '!=',
251
- 'rhs' => 'on',
252
- ),
253
- ),
254
- ),
255
- 'description' => array(
256
- 'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
257
- 'default' => '',
258
- 'type' => 'textarea',
259
- 'condshow' => array(
260
- 'aiosp_opengraph_setmeta' => array(
261
- 'lhs' => 'aiosp_opengraph_setmeta',
262
- 'op' => '!=',
263
- 'rhs' => 'on',
264
- ),
265
- ),
266
- ),
267
- 'homeimage' => array(
268
- 'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
269
- 'type' => 'image',
270
- ),
271
- 'generate_descriptions' => array(
272
- 'name' => __( 'Use Content For Autogenerated OG Descriptions', 'all-in-one-seo-pack' ),
273
- 'default' => 0,
274
- ),
275
- 'defimg' => array(
276
- 'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
277
- 'type' => 'select',
278
- 'initial_options' => array(
279
- '' => __( 'Default Image' ),
280
- 'featured' => __( 'Featured Image' ),
281
- 'attach' => __( 'First Attached Image' ),
282
- 'content' => __( 'First Image In Content' ),
283
- 'custom' => __( 'Image From Custom Field' ),
284
- 'author' => __( 'Post Author Image' ),
285
- 'auto' => __( 'First Available Image' ),
286
- ),
287
- ),
288
- 'fallback' => array(
289
- 'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
290
- 'type' => 'checkbox',
291
- ),
292
- 'dimg' => array(
293
- 'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
294
- 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
295
- 'type' => 'image',
296
- ),
297
- 'dimgwidth' => array(
298
- 'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
299
- 'type' => 'text',
300
- 'default' => '',
301
- ),
302
- 'dimgheight' => array(
303
- 'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
304
- 'type' => 'text',
305
- 'default' => '',
306
- ),
307
- 'meta_key' => array(
308
- 'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
309
- 'type' => 'text',
310
- 'default' => '',
311
- ),
312
- 'image' => array(
313
- 'name' => __( 'Image', 'all-in-one-seo-pack' ),
314
- 'type' => 'radio',
315
- 'initial_options' => array(
316
- 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">',
317
- ),
318
- ),
319
- 'customimg' => array(
320
- 'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
321
- 'type' => 'image',
322
- ),
323
- 'imagewidth' => array(
324
- 'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
325
- 'type' => 'text',
326
- 'default' => '',
327
- ),
328
- 'imageheight' => array(
329
- 'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
330
- 'type' => 'text',
331
- 'default' => '',
332
- ),
333
- 'video' => array(
334
- 'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
335
- 'type' => 'text',
336
- ),
337
- 'videowidth' => array(
338
- 'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
339
- 'type' => 'text',
340
- 'default' => '',
341
- 'condshow' => array(
342
- 'aioseop_opengraph_settings_video' => array(
343
- 'lhs' => 'aioseop_opengraph_settings_video',
344
- 'op' => '!=',
345
- 'rhs' => '',
346
- ),
347
- ),
348
- ),
349
- 'videoheight' => array(
350
- 'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
351
- 'type' => 'text',
352
- 'default' => '',
353
- 'condshow' => array(
354
- 'aioseop_opengraph_settings_video' => array(
355
- 'lhs' => 'aioseop_opengraph_settings_video',
356
- 'op' => '!=',
357
- 'rhs' => '',
358
- ),
359
- ),
360
- ),
361
- 'defcard' => array(
362
- 'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
363
- 'type' => 'select',
364
- 'default' => 'summary',
365
- 'initial_options' => array(
366
- 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
367
- 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
368
-
369
- /*
370
- REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
371
- 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
372
- */
373
- ),
374
- ),
375
- 'setcard' => array(
376
- 'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
377
- 'type' => 'select',
378
- 'initial_options' => array(
379
- 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
380
- 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
381
-
382
- /*
383
- REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
384
- 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
385
- */
386
- ),
387
- ),
388
- 'twitter_site' => array(
389
- 'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
390
- 'type' => 'text',
391
- 'default' => '',
392
- ),
393
- 'twitter_creator' => array(
394
- 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' ),
395
- ),
396
- 'twitter_domain' => array(
397
- 'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
398
- 'type' => 'text',
399
- 'default' => '',
400
- ),
401
- 'customimg_twitter' => array(
402
- 'name' => __( 'Custom Twitter Image', 'all-in-one-seo-pack' ),
403
- 'type' => 'image',
404
- ),
405
- 'gen_tags' => array(
406
- 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' ),
407
- ),
408
- 'gen_keywords' => array(
409
- 'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
410
- 'default' => 'on',
411
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
412
- ),
413
- 'gen_categories' => array(
414
- 'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
415
- 'default' => 'on',
416
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
417
- ),
418
- 'gen_post_tags' => array(
419
- 'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
420
- 'default' => 'on',
421
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
422
- ),
423
- 'types' => array(
424
- 'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
425
- 'type' => 'multicheckbox',
426
- 'default' => array( 'post' => 'post', 'page' => 'page' ),
427
- 'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
428
- ),
429
- 'title' => array(
430
- 'name' => __( 'Title', 'all-in-one-seo-pack' ),
431
- 'default' => '',
432
- 'type' => 'text',
433
- 'size' => 95,
434
- 'count' => 1,
435
- 'count_desc' => $count_desc,
436
- ),
437
- 'desc' => array(
438
- 'name' => __( 'Description', 'all-in-one-seo-pack' ),
439
- 'default' => '',
440
- 'type' => 'textarea',
441
- 'cols' => 250,
442
- 'rows' => 4,
443
- 'count' => 1,
444
- 'count_desc' => $count_desc,
445
- ),
446
- 'category' => array(
447
- 'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
448
- 'type' => 'select',
449
- 'style' => '',
450
- 'default' => '',
451
- 'initial_options' => $this->fb_object_types,
452
- ),
453
- 'facebook_debug' => array(
454
- 'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
455
- 'type' => 'html',
456
- 'save' => false,
457
- 'default' => $this->get_facebook_debug(),
458
- ),
459
- 'section' => array(
460
- 'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
461
- 'type' => 'text',
462
- 'default' => '',
463
- 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
464
- ),
465
- 'tag' => array(
466
- 'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
467
- 'type' => 'text',
468
- 'default' => '',
469
- 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
470
- ),
471
- 'facebook_publisher' => array(
472
- 'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
473
- 'type' => 'text',
474
- 'default' => '',
475
- ),
476
- 'facebook_author' => array(
477
- 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ),
478
- ),
479
- 'profile_links' => array(
480
- 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
481
- 'type' => 'textarea',
482
- 'cols' => 60,
483
- 'rows' => 5,
484
- ),
485
- 'person_or_org' => array(
486
- 'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
487
- 'type' => 'radio',
488
- 'initial_options' => array(
489
- 'person' => __( 'Person', 'all-in-one-seo-pack' ),
490
- 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
491
- ),
492
- ),
493
- 'social_name' => array(
494
- 'name' => __( 'Associated Name', 'all-in-one-seo-pack' ),
495
- 'type' => 'text',
496
- 'default' => '',
497
- ),
498
- );
499
- // load initial options / set defaults
500
- $this->update_options();
501
- $display = array();
502
- if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
503
- $display = $this->options['aiosp_opengraph_types'];
504
- }
505
- $this->locations = array(
506
- 'opengraph' => array(
507
- 'name' => $this->name,
508
- 'prefix' => 'aiosp_',
509
- 'type' => 'settings',
510
- 'options' => array(
511
- 'scan_header',
512
- 'setmeta',
513
- 'key',
514
- 'appid',
515
- 'sitename',
516
- 'title_shortcodes',
517
- 'description_shortcodes',
518
- 'hometitle',
519
- 'description',
520
- 'homeimage',
521
- 'generate_descriptions',
522
- 'defimg',
523
- 'fallback',
524
- 'dimg',
525
- 'dimgwidth',
526
- 'dimgheight',
527
- 'meta_key',
528
- 'defcard',
529
- 'profile_links',
530
- 'person_or_org',
531
- 'social_name',
532
- 'twitter_site',
533
- 'twitter_creator',
534
- 'twitter_domain',
535
- 'gen_tags',
536
- 'gen_keywords',
537
- 'gen_categories',
538
- 'gen_post_tags',
539
- 'types',
540
- 'facebook_publisher',
541
- 'facebook_author',
542
- ),
543
- ),
544
- 'settings' => array(
545
- 'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
546
- 'type' => 'metabox',
547
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/',
548
- 'options' => array(
549
- 'title',
550
- 'desc',
551
- 'image',
552
- 'customimg',
553
- 'imagewidth',
554
- 'imageheight',
555
- 'video',
556
- 'videowidth',
557
- 'videoheight',
558
- 'category',
559
- 'facebook_debug',
560
- 'section',
561
- 'tag',
562
- 'setcard',
563
- 'customimg_twitter',
564
- ),
565
- 'display' => apply_filters( 'aioseop_opengraph_display', $display ),
566
- 'prefix' => 'aioseop_opengraph_',
567
- ),
568
- );
569
- $this->layout = array(
570
- 'home' => array(
571
- 'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
572
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
573
- 'options' => array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage' ),
574
- ),
575
- 'image' => array(
576
- 'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
577
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
578
- 'options' => array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
579
- ),
580
- 'links' => array(
581
- 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
582
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
583
- 'options' => array( 'profile_links', 'person_or_org', 'social_name' ),
584
- ),
585
- 'facebook' => array(
586
- 'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
587
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
588
- 'options' => array(
589
- 'key',
590
- 'appid',
591
- 'types',
592
- 'gen_tags',
593
- 'gen_keywords',
594
- 'gen_categories',
595
- 'gen_post_tags',
596
- 'facebook_publisher',
597
- 'facebook_author',
598
- ),
599
- ),
600
- 'twitter' => array(
601
- 'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
602
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
603
- 'options' => array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
604
- ),
605
- 'default' => array(
606
- 'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
607
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
608
- 'options' => array(), // this is set below, to the remaining options -- pdb
609
- ),
610
- 'scan_meta' => array(
611
- 'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
612
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
613
- 'options' => array( 'scan_header' ),
614
- ),
615
- );
616
- $other_options = array();
617
- foreach ( $this->layout as $k => $v ) {
618
- $other_options = array_merge( $other_options, $v['options'] );
619
- }
620
-
621
- $this->layout['default']['options'] = array_diff( array_keys( $this->default_options ), $other_options );
622
- }
623
-
624
- /**
625
- * Forces FaceBook OpenGraph to refresh its cache when a post is changed to
626
- *
627
- * @param $new_status
628
- * @param $old_status
629
- * @param $post
630
- *
631
- * @todo this and force_fb_refresh_update can probably have the remote POST extracted out.
632
- *
633
- * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
634
- * @since 2.3.11
635
- */
636
- function force_fb_refresh_transition( $new_status, $old_status, $post ) {
637
- if ( 'publish' !== $new_status ) {
638
- return;
639
- }
640
- if ( 'future' !== $old_status ) {
641
- return;
642
- }
643
-
644
- $current_post_type = get_post_type();
645
-
646
- // Only ping Facebook if Social SEO is enabled on this post type.
647
- if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
648
- $post_url = aioseop_get_permalink( $post->ID );
649
- $endpoint = sprintf(
650
- 'https://graph.facebook.com/?%s', http_build_query(
651
- array(
652
- 'id' => $post_url,
653
- 'scrape' => true,
654
- )
655
- )
656
- );
657
- wp_remote_post( $endpoint, array( 'blocking' => false ) );
658
- }
659
- }
660
-
661
- /**
662
- * Forces FaceBook OpenGraph refresh on update.
663
- *
664
- * @param $post_id
665
- * @param $post_after
666
- *
667
- * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
668
- * @since 2.3.11
669
- */
670
- function force_fb_refresh_update( $post_id, $post_after ) {
671
-
672
- $current_post_type = get_post_type();
673
-
674
- // Only ping Facebook if Social SEO is enabled on this post type.
675
- if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
676
- $post_url = aioseop_get_permalink( $post_id );
677
- $endpoint = sprintf(
678
- 'https://graph.facebook.com/?%s', http_build_query(
679
- array(
680
- 'id' => $post_url,
681
- 'scrape' => true,
682
- )
683
- )
684
- );
685
- wp_remote_post( $endpoint, array( 'blocking' => false ) );
686
- }
687
- }
688
-
689
- function settings_page_init() {
690
- add_filter( 'aiosp_output_option', array( $this, 'display_custom_options' ), 10, 2 );
691
- }
692
-
693
- function filter_options( $options, $location ) {
694
- if ( $location == 'settings' ) {
695
- $prefix = $this->get_prefix( $location ) . $location . '_';
696
- list( $legacy, $images ) = $this->get_all_images( $options );
697
- if ( isset( $options ) && isset( $options["{$prefix}image"] ) ) {
698
- $thumbnail = $options["{$prefix}image"];
699
- if ( ctype_digit( (string) $thumbnail ) || ( $thumbnail == 'post' ) ) {
700
- if ( $thumbnail == 'post' ) {
701
- $thumbnail = $images['post1'];
702
- } elseif ( ! empty( $legacy[ $thumbnail ] ) ) {
703
- $thumbnail = $legacy[ $thumbnail ];
704
- }
705
- }
706
- $options["{$prefix}image"] = $thumbnail;
707
- }
708
- if ( empty( $options[ $prefix . 'image' ] ) ) {
709
- $img = array_keys( $images );
710
- if ( ! empty( $img ) && ! empty( $img[1] ) ) {
711
- $options[ $prefix . 'image' ] = $img[1];
712
- }
713
- }
714
- }
715
-
716
- return $options;
717
- }
718
-
719
- /**
720
- * Applies filter to module settings.
721
- *
722
- * @since 2.3.11
723
- * @since 2.4.14 Added filter for description and title placeholders.
724
- * @since 2.3.15 do_shortcode on description.
725
- *
726
- * @see [plugin]\admin\aioseop_module_class.php > display_options()
727
- */
728
- function filter_settings( $settings, $location, $current ) {
729
- global $aiosp, $post;
730
- if ( $location == 'opengraph' || $location == 'settings' ) {
731
- $prefix = $this->get_prefix( $location ) . $location . '_';
732
- if ( $location == 'opengraph' ) {
733
- return $settings;
734
- }
735
- if ( $location == 'settings' ) {
736
- list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
737
- $opts = array( 'title', 'desc' );
738
- $current_post_type = get_post_type();
739
- if ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
740
- $flat_type_list = array();
741
- foreach ( $this->fb_object_types as $k => $v ) {
742
- if ( is_array( $v ) ) {
743
- $flat_type_list = array_merge( $flat_type_list, $v );
744
- } else {
745
- $flat_type_list[ $k ] = $v;
746
- }
747
- }
748
- $settings[ $prefix . 'category' ]['initial_options'] = array_merge(
749
- array(
750
- $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
751
- . $flat_type_list[ $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ],
752
- ),
753
- $settings[ $prefix . 'category' ]['initial_options']
754
- );
755
- }
756
- if ( isset( $this->options['aiosp_opengraph_defcard'] ) ) {
757
- $settings[ $prefix . 'setcard' ]['default'] = $this->options['aiosp_opengraph_defcard'];
758
- }
759
- $info = $aiosp->get_page_snippet_info();
760
- $title = $info['title'];
761
- $description = $info['description'];
762
-
763
- // Description options
764
- if ( is_object( $post ) ) {
765
- // Always show excerpt
766
- $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
767
- ? $aiosp->trim_excerpt_without_filters(
768
- $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
769
- 1000
770
- )
771
- : $aiosp->trim_excerpt_without_filters(
772
- $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ),
773
- 1000
774
- );
775
- }
776
-
777
- // #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
778
- $screen = get_current_screen();
779
- $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
780
-
781
- // Add filters
782
- $description = apply_filters( 'aioseop_description', $description, false, $ignore_php_version );
783
- // Add placholders
784
- $settings[ "{$prefix}title" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
785
- $settings[ "{$prefix}desc" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
786
- }
787
- if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
788
- foreach ( $opts as $opt ) {
789
- if ( isset( $settings[ $prefix . $opt ] ) ) {
790
- $settings[ $prefix . $opt ]['type'] = 'hidden';
791
- $settings[ $prefix . $opt ]['label'] = 'none';
792
- $settings[ $prefix . $opt ]['help_text'] = '';
793
- unset( $settings[ $prefix . $opt ]['count'] );
794
- }
795
- }
796
- }
797
- }
798
-
799
- return $settings;
800
- }
801
-
802
- /**
803
- * Applies filter to module options.
804
- * These will display in the "Social Settings" object tab.
805
- * filter:{prefix}override_options
806
- *
807
- * @since 2.3.11
808
- * @since 2.4.14 Overrides empty og:type values.
809
- *
810
- * @see [plugin]\admin\aioseop_module_class.php > display_options()
811
- *
812
- * @global array $aioseop_options Plugin options.
813
- *
814
- * @param array $options Current options.
815
- * @param string $location Location where filter is called.
816
- * @param array $settings Settings.
817
- *
818
- * @return array
819
- */
820
- function override_options( $options, $location, $settings ) {
821
- global $aioseop_options;
822
- // Prepare default and prefix
823
- $prefix = $this->get_prefix( $location ) . $location . '_';
824
- $opts = array();
825
-
826
- foreach ( $settings as $k => $v ) {
827
- if ( $v['save'] ) {
828
- $opts[ $k ] = $v['default'];
829
- }
830
- }
831
- foreach ( $options as $k => $v ) {
832
- switch ( $k ) {
833
- case $prefix . 'category':
834
- if ( empty( $v ) ) {
835
- // Get post type
836
- $type = isset( get_current_screen()->post_type )
837
- ? get_current_screen()->post_type
838
- : null;
839
- // Assign default from plugin options
840
- if ( ! empty( $type )
841
- && isset( $aioseop_options['modules'] )
842
- && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
843
- && isset( $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ] )
844
- ) {
845
- $options[ $prefix . 'category' ] =
846
- $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ];
847
- }
848
- continue;
849
- }
850
- break;
851
- }
852
- if ( $v === null ) {
853
- unset( $options[ $k ] );
854
- }
855
- }
856
- $options = wp_parse_args( $options, $opts );
857
-
858
- return $options;
859
- }
860
-
861
- /**
862
- * Applies filter to metabox settings before they are saved.
863
- * Sets custom as default if a custom image is uploaded.
864
- * filter:{prefix}filter_metabox_options
865
- * filter:{prefix}filter_term_metabox_options
866
- *
867
- * @since 2.3.11
868
- * @since 2.4.14 Fixes for aioseop-pro #67 and other bugs found.
869
- *
870
- * @see [plugin]\admin\aioseop_module_class.php > save_post_data()
871
- * @see [this file] > save_tax_data()
872
- *
873
- * @param array $options List of current options.
874
- * @param string $location Location where filter is called.
875
- * @param int $id Either post_id or term_id.
876
- *
877
- * @return array
878
- */
879
- function filter_metabox_options( $options, $location, $post_id ) {
880
- if ( $location == 'settings' ) {
881
- $prefix = $this->get_prefix( $location ) . $location . '_';
882
- if ( isset( $options[ $prefix . 'customimg_checker' ] )
883
- && $options[ $prefix . 'customimg_checker' ]
884
- ) {
885
- $options[ $prefix . 'image' ] = $options[ $prefix . 'customimg' ];
886
- }
887
- }
888
- return $options;
889
- }
890
-
891
- /** Custom settings **/
892
- function display_custom_options( $buf, $args ) {
893
- if ( $args['name'] == 'aiosp_opengraph_scan_header' ) {
894
- $buf .= '<div class="aioseop aioseop_options aiosp_opengraph_settings"><div class="aioseop_wrapper aioseop_custom_type" id="aiosp_opengraph_scan_header_wrapper"><div class="aioseop_input" id="aiosp_opengraph_scan_header" style="padding-left:20px;">';
895
- $args['options']['type'] = 'submit';
896
- $args['attr'] = " class='button-primary' ";
897
- $args['value'] = $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
898
- $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
899
- $buf .= '<br /><br />' . $this->get_option_html( $args );
900
- $buf .= '</div></div></div>';
901
- }
902
-
903
- return $buf;
904
- }
905
-
906
- function add_attributes( $output ) {
907
- // avoid having duplicate meta tags
908
- $type = $this->type;
909
- if ( empty( $type ) ) {
910
- $type = 'website';
911
- }
912
-
913
- $schema_types = array(
914
- 'album' => 'MusicAlbum',
915
- 'article' => 'Article',
916
- 'bar' => 'BarOrPub',
917
- 'blog' => 'Blog',
918
- 'book' => 'Book',
919
- 'cafe' => 'CafeOrCoffeeShop',
920
- 'city' => 'City',
921
- 'country' => 'Country',
922
- 'episode' => 'Episode',
923
- 'food' => 'FoodEvent',
924
- 'game' => 'Game',
925
- 'hotel' => 'Hotel',
926
- 'landmark' => 'LandmarksOrHistoricalBuildings',
927
- 'movie' => 'Movie',
928
- 'product' => 'Product',
929
- 'profile' => 'ProfilePage',
930
- 'restaurant' => 'Restaurant',
931
- 'school' => 'School',
932
- 'sport' => 'SportsEvent',
933
- 'website' => 'WebSite',
934
- );
935
-
936
- if ( ! empty( $schema_types[ $type ] ) ) {
937
- $type = $schema_types[ $type ];
938
- } else {
939
- $type = 'WebSite';
940
- }
941
-
942
- $attributes = apply_filters(
943
- $this->prefix . 'attributes', array(
944
- 'itemscope',
945
- 'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
946
- 'prefix="og: http://ogp.me/ns#"',
947
- )
948
- );
949
-
950
- foreach ( $attributes as $attr ) {
951
- if ( strpos( $output, $attr ) === false ) {
952
- $output .= "\n\t$attr ";
953
- }
954
- }
955
-
956
- return $output;
957
- }
958
-
959
- /**
960
- * Add our social meta.
961
- *
962
- * @since 1.0.0
963
- * @since 2.3.11.5 Support for multiple fb_admins.
964
- * @since 2.3.13 Adds filter:aioseop_description on description.
965
- * @since 2.4.14 Fixes for aioseop-pro #67.
966
- * @since 2.3.15 Always do_shortcode on descriptions, removed for titles.
967
- *
968
- * @global object $post Current WP_Post object.
969
- * @global object $aiosp All in one seo plugin object.
970
- * @global array $aioseop_options All in one seo plugin options.
971
- * @global object $wp_query WP_Query global instance.
972
- */
973
- function add_meta() {
974
- global $post, $aiosp, $aioseop_options, $wp_query;
975
- $metabox = $this->get_current_options( array(), 'settings' );
976
- $key = $this->options['aiosp_opengraph_key'];
977
- $dimg = $this->options['aiosp_opengraph_dimg'];
978
- $current_post_type = get_post_type();
979
- $title = $description = $image = $video = '';
980
- $type = $this->type;
981
- $sitename = $this->options['aiosp_opengraph_sitename'];
982
-
983
- $appid = isset( $this->options['aiosp_opengraph_appid'] ) ? $this->options['aiosp_opengraph_appid'] : '';
984
-
985
- if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
986
- $first_page = false;
987
- if ( $aiosp->get_page_number() < 2 ) {
988
- $first_page = true;
989
- }
990
- } else {
991
- $first_page = true;
992
- }
993
- $url = $aiosp->aiosp_mrt_get_url( $wp_query );
994
- $url = apply_filters( 'aioseop_canonical_url', $url );
995
-
996
- $setmeta = $this->options['aiosp_opengraph_setmeta'];
997
- $social_links = '';
998
- if ( is_front_page() ) {
999
- $title = $this->options['aiosp_opengraph_hometitle'];
1000
- if ( $first_page ) {
1001
- $description = $this->options['aiosp_opengraph_description'];
1002
- if ( empty( $description ) ) {
1003
- $description = get_bloginfo( 'description' );
1004
- }
1005
- }
1006
- if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
1007
- $thumbnail = $this->options['aiosp_opengraph_homeimage'];
1008
- } else {
1009
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1010
- }
1011
-
1012
- /* If Use AIOSEO Title and Desc Selected */
1013
- if ( $setmeta ) {
1014
- $title = $aiosp->wp_title();
1015
- if ( $first_page ) {
1016
- $description = $aiosp->get_aioseop_description( $post );
1017
- }
1018
- }
1019
-
1020
- /* Add some defaults */
1021
- if ( empty( $title ) ) {
1022
- $title = get_bloginfo( 'name' );
1023
- }
1024
- if ( empty( $sitename ) ) {
1025
- $sitename = get_bloginfo( 'name' );
1026
- }
1027
-
1028
- if ( empty( $description ) && $first_page && ! empty( $post ) && ! post_password_required( $post ) ) {
1029
-
1030
- if ( ! empty( $post->post_content ) || ! empty( $post->post_excerpt ) ) {
1031
- $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ), 1000 );
1032
-
1033
- if ( ! empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) {
1034
- $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
1035
- }
1036
- }
1037
- }
1038
-
1039
- if ( empty( $description ) && $first_page ) {
1040
- $description = get_bloginfo( 'description' );
1041
- }
1042
- if ( ! empty( $this->options['aiosp_opengraph_profile_links'] ) ) {
1043
- $social_links = $this->options['aiosp_opengraph_profile_links'];
1044
- if ( ! empty( $this->options['aiosp_opengraph_social_name'] ) ) {
1045
- $social_name = $this->options['aiosp_opengraph_social_name'];
1046
- } else {
1047
- $social_name = '';
1048
- }
1049
- if ( $this->options['aiosp_opengraph_person_or_org'] == 'person' ) {
1050
- $social_type = 'Person';
1051
- } else {
1052
- $social_type = 'Organization';
1053
- }
1054
- }
1055
- } elseif ( is_singular() && $this->option_isset( 'types' )
1056
- && is_array( $this->options['aiosp_opengraph_types'] )
1057
- && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1058
- ) {
1059
-
1060
- if ( $type == 'article' ) {
1061
- if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1062
- $section = $metabox['aioseop_opengraph_settings_section'];
1063
- }
1064
- if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1065
- $tag = $metabox['aioseop_opengraph_settings_tag'];
1066
- }
1067
- if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1068
- $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1069
- }
1070
- }
1071
-
1072
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1073
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1074
- }
1075
-
1076
- if ( $type == 'article' && ! empty( $post ) ) {
1077
- if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1078
- $author = get_the_author_meta( 'facebook', $post->post_author );
1079
- }
1080
-
1081
- if ( isset( $post->post_date_gmt ) ) {
1082
- $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date_gmt ) );
1083
- }
1084
-
1085
- if ( isset( $post->post_modified_gmt ) ) {
1086
- $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified_gmt ) );
1087
- }
1088
- }
1089
-
1090
- $image = $metabox['aioseop_opengraph_settings_image'];
1091
- $video = $metabox['aioseop_opengraph_settings_video'];
1092
- $title = $metabox['aioseop_opengraph_settings_title'];
1093
- $description = $metabox['aioseop_opengraph_settings_desc'];
1094
-
1095
- /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1096
- global $aiosp;
1097
- if ( empty( $title ) ) {
1098
- $title = $aiosp->wp_title();
1099
- }
1100
- if ( empty( $description ) ) {
1101
- $description = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
1102
- }
1103
-
1104
- /* Add default title */
1105
- if ( empty( $title ) ) {
1106
- $title = get_the_title();
1107
- }
1108
-
1109
- // Add default description.
1110
- if ( empty( $description ) && ! post_password_required( $post ) ) {
1111
-
1112
- $description = $post->post_excerpt;
1113
-
1114
- if ( $this->options['aiosp_opengraph_generate_descriptions'] || empty( $description ) ) {
1115
- $description = $post->post_content;
1116
- }
1117
- }
1118
- if ( empty( $type ) ) {
1119
- $type = 'article';
1120
- }
1121
- } elseif ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1122
- if ( isset( $this->options['aioseop_opengraph_settings_category'] ) ) {
1123
- $type = $this->options['aioseop_opengraph_settings_category'];
1124
- }
1125
- if ( isset( $metabox['aioseop_opengraph_settings_category'] ) ) {
1126
- $type = $metabox['aioseop_opengraph_settings_category'];
1127
- }
1128
- if ( $type == 'article' ) {
1129
- if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1130
- $section = $metabox['aioseop_opengraph_settings_section'];
1131
- }
1132
- if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1133
- $tag = $metabox['aioseop_opengraph_settings_tag'];
1134
- }
1135
- if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1136
- $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1137
- }
1138
- }
1139
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1140
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1141
- }
1142
- if ( $type == 'article' && ! empty( $post ) ) {
1143
- if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1144
- $author = get_the_author_meta( 'facebook', $post->post_author );
1145
- }
1146
-
1147
- if ( isset( $post->post_date_gmt ) ) {
1148
- $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date_gmt ) );
1149
- }
1150
- if ( isset( $post->post_modified_gmt ) ) {
1151
- $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified_gmt ) );
1152
- }
1153
- }
1154
- $image = $metabox['aioseop_opengraph_settings_image'];
1155
- $video = $metabox['aioseop_opengraph_settings_video'];
1156
- $title = $metabox['aioseop_opengraph_settings_title'];
1157
- $description = $metabox['aioseop_opengraph_settings_desc'];
1158
- /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1159
- global $aiosp;
1160
- if ( empty( $title ) ) {
1161
- $title = $aiosp->wp_title();
1162
- }
1163
- if ( empty( $description ) ) {
1164
- $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1165
- $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1166
- $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1167
- }
1168
- // Add default title
1169
- if ( empty( $title ) ) {
1170
- $title = get_the_title();
1171
- }
1172
- // Add default description.
1173
- if ( empty( $description ) && ! post_password_required( $post ) ) {
1174
- $description = get_queried_object()->description;
1175
- }
1176
- if ( empty( $type ) ) {
1177
- $type = 'website';
1178
- }
1179
- } elseif ( is_home() && ! is_front_page() ) {
1180
- // This is the blog page but not the homepage.
1181
- global $aiosp;
1182
- $image = $metabox['aioseop_opengraph_settings_image'];
1183
- $video = $metabox['aioseop_opengraph_settings_video'];
1184
- $title = $metabox['aioseop_opengraph_settings_title'];
1185
- $description = $metabox['aioseop_opengraph_settings_desc'];
1186
-
1187
- if ( empty( $description ) ) {
1188
- // If there's not social description, fall back to the SEO description.
1189
- $description = trim( strip_tags( get_post_meta( get_option( 'page_for_posts' ), '_aioseop_description', true ) ) );
1190
- }
1191
- if ( empty( $title ) ) {
1192
- $title = $aiosp->wp_title();
1193
- }
1194
- } else {
1195
- return;
1196
- }
1197
-
1198
- if ( $type === 'article' && ! empty( $post ) && is_singular() ) {
1199
- if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1200
- if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1201
- $keywords = $aiosp->get_main_keywords();
1202
- $keywords = $this->apply_cf_fields( $keywords );
1203
- $keywords = apply_filters( 'aioseop_keywords', $keywords );
1204
- if ( ! empty( $keywords ) && ! empty( $tag ) ) {
1205
- $tag .= ',' . $keywords;
1206
- } elseif ( empty( $tag ) ) {
1207
- $tag = $keywords;
1208
- }
1209
- }
1210
- $tag = $aiosp->keyword_string_to_list( $tag );
1211
- if ( ! empty( $this->options['aiosp_opengraph_gen_categories'] ) ) {
1212
- $tag = array_merge( $tag, $aiosp->get_all_categories( $post->ID ) );
1213
- }
1214
- if ( ! empty( $this->options['aiosp_opengraph_gen_post_tags'] ) ) {
1215
- $tag = array_merge( $tag, $aiosp->get_all_tags( $post->ID ) );
1216
- }
1217
- }
1218
- if ( ! empty( $tag ) ) {
1219
- $tag = $aiosp->clean_keyword_list( $tag );
1220
- }
1221
- }
1222
-
1223
- if ( ! empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
1224
- $title = do_shortcode( $title );
1225
- }
1226
- if ( ! empty( $description ) ) {
1227
- $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
1228
- if ( ! empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
1229
- $description = do_shortcode( $description );
1230
- }
1231
- $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );
1232
- }
1233
-
1234
- $title = $this->apply_cf_fields( $title );
1235
- $description = $this->apply_cf_fields( $description );
1236
-
1237
- /* Data Validation */
1238
- $title = strip_tags( esc_attr( $title ) );
1239
- $sitename = strip_tags( esc_attr( $sitename ) );
1240
- $description = strip_tags( esc_attr( $description ) );
1241
-
1242
- if ( empty( $thumbnail ) && ! empty( $image ) ) {
1243
- $thumbnail = $image;
1244
- }
1245
-
1246
- // Add user supplied default image.
1247
- if ( empty( $thumbnail ) ) {
1248
- if ( empty( $this->options['aiosp_opengraph_defimg'] ) ) {
1249
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1250
- } else {
1251
- switch ( $this->options['aiosp_opengraph_defimg'] ) {
1252
- case 'featured':
1253
- $thumbnail = $this->get_the_image_by_post_thumbnail();
1254
- break;
1255
- case 'attach':
1256
- $thumbnail = $this->get_the_image_by_attachment();
1257
- break;
1258
- case 'content':
1259
- $thumbnail = $this->get_the_image_by_scan();
1260
- break;
1261
- case 'custom':
1262
- $meta_key = $this->options['aiosp_opengraph_meta_key'];
1263
- if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1264
- $meta_key = explode( ',', $meta_key );
1265
- $thumbnail = $this->get_the_image_by_meta_key(
1266
- array(
1267
- 'post_id' => $post->ID,
1268
- 'meta_key' => $meta_key,
1269
- )
1270
- );
1271
- }
1272
- break;
1273
- case 'auto':
1274
- $thumbnail = $this->get_the_image();
1275
- break;
1276
- case 'author':
1277
- $thumbnail = $this->get_the_image_by_author();
1278
- break;
1279
- default:
1280
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1281
- }
1282
- }
1283
- }
1284
-
1285
- if ( ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) ) {
1286
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1287
- }
1288
-
1289
- if ( ! empty( $thumbnail ) ) {
1290
- $thumbnail = esc_url( $thumbnail );
1291
- $thumbnail = set_url_scheme( $thumbnail );
1292
- }
1293
-
1294
- $width = $height = '';
1295
- if ( ! empty( $thumbnail ) ) {
1296
- if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1297
- $width = $metabox['aioseop_opengraph_settings_imagewidth'];
1298
- }
1299
- if ( ! empty( $metabox['aioseop_opengraph_settings_imageheight'] ) ) {
1300
- $height = $metabox['aioseop_opengraph_settings_imageheight'];
1301
- }
1302
- if ( empty( $width ) && ! empty( $this->options['aiosp_opengraph_dimgwidth'] ) ) {
1303
- $width = $this->options['aiosp_opengraph_dimgwidth'];
1304
- }
1305
- if ( empty( $height ) && ! empty( $this->options['aiosp_opengraph_dimgheight'] ) ) {
1306
- $height = $this->options['aiosp_opengraph_dimgheight'];
1307
- }
1308
- }
1309
-
1310
- if ( ! empty( $video ) ) {
1311
- if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1312
- $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
1313
- }
1314
- if ( ! empty( $metabox['aioseop_opengraph_settings_videoheight'] ) ) {
1315
- $videoheight = $metabox['aioseop_opengraph_settings_videoheight'];
1316
- }
1317
- }
1318
-
1319
- $card = 'summary';
1320
- if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1321
- $card = $this->options['aiosp_opengraph_defcard'];
1322
- }
1323
-
1324
- if ( ! empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) {
1325
- $card = $metabox['aioseop_opengraph_settings_setcard'];
1326
- }
1327
-
1328
- // support for changing legacy twitter cardtype-photo to summary large image
1329
- if ( $card == 'photo' ) {
1330
- $card = 'summary_large_image';
1331
- }
1332
-
1333
- $site = $domain = $creator = '';
1334
-
1335
- if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1336
- $site = $this->options['aiosp_opengraph_twitter_site'];
1337
- $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
1338
- }
1339
-
1340
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1341
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1342
- }
1343
-
1344
- if ( ! empty( $post ) && isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) {
1345
- $creator = get_the_author_meta( 'twitter', $post->post_author );
1346
- $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1347
- }
1348
-
1349
- if ( ! empty( $thumbnail ) ) {
1350
- $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1351
- }
1352
-
1353
- if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1354
- // Set Twitter image from custom.
1355
- $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1356
- }
1357
-
1358
- // Apply last filters.
1359
- $description = apply_filters( 'aioseop_description', $description );
1360
-
1361
- $meta = array(
1362
- 'facebook' => array(
1363
- 'title' => 'og:title',
1364
- 'type' => 'og:type',
1365
- 'url' => 'og:url',
1366
- 'thumbnail' => 'og:image',
1367
- 'width' => 'og:image:width',
1368
- 'height' => 'og:image:height',
1369
- 'video' => 'og:video',
1370
- 'videowidth' => 'og:video:width',
1371
- 'videoheight' => 'og:video:height',
1372
- 'sitename' => 'og:site_name',
1373
- 'key' => 'fb:admins',
1374
- 'appid' => 'fb:app_id',
1375
- 'description' => 'og:description',
1376
- 'section' => 'article:section',
1377
- 'tag' => 'article:tag',
1378
- 'publisher' => 'article:publisher',
1379
- 'author' => 'article:author',
1380
- 'published_time' => 'article:published_time',
1381
- 'modified_time' => 'article:modified_time',
1382
- ),
1383
- 'twitter' => array(
1384
- 'card' => 'twitter:card',
1385
- 'site' => 'twitter:site',
1386
- 'creator' => 'twitter:creator',
1387
- 'domain' => 'twitter:domain',
1388
- 'title' => 'twitter:title',
1389
- 'description' => 'twitter:description',
1390
- 'twitter_thumbnail' => 'twitter:image',
1391
- ),
1392
- );
1393
-
1394
- // Only show if "use schema.org markup is checked".
1395
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
1396
- $meta['google+'] = array( 'thumbnail' => 'image' );
1397
- }
1398
-
1399
- $tags = array(
1400
- 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
1401
- 'twitter' => array( 'name' => 'name', 'value' => 'content' ),
1402
- 'google+' => array( 'name' => 'itemprop', 'value' => 'content' ),
1403
- );
1404
-
1405
- foreach ( $meta as $t => $data ) {
1406
- foreach ( $data as $k => $v ) {
1407
- if ( empty( $$k ) ) {
1408
- $$k = '';
1409
- }
1410
- $filtered_value = $$k;
1411
- $filtered_value = apply_filters( $this->prefix . 'meta', $filtered_value, $t, $k );
1412
- if ( ! empty( $filtered_value ) ) {
1413
- if ( ! is_array( $filtered_value ) ) {
1414
- $filtered_value = array( $filtered_value );
1415
- }
1416
-
1417
- /**
1418
- * This is to accomodate multiple fb:admins on separate lines.
1419
- * @TODO Eventually we'll want to put this in its own function so things like images work too.
1420
- */
1421
- if ( 'key' === $k ) {
1422
- $fbadmins = explode( ',', str_replace( ' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1423
- foreach ( $fbadmins as $fbadmin ) {
1424
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
1425
- }
1426
- } else {
1427
- // For everything else.
1428
- foreach ( $filtered_value as $f ) {
1429
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $f . '" />' . "\n";
1430
- }
1431
- }
1432
- }
1433
- }
1434
- }
1435
- $social_link_schema = '';
1436
- if ( ! empty( $social_links ) ) {
1437
- $home_url = esc_url( get_home_url() );
1438
- $social_links = explode( "\n", $social_links );
1439
- foreach ( $social_links as $k => $v ) {
1440
- $v = trim( $v );
1441
- if ( empty( $v ) ) {
1442
- unset( $social_links[ $k ] );
1443
- } else {
1444
- $v = esc_url( $v );
1445
- $social_links[ $k ] = $v;
1446
- }
1447
- }
1448
- $social_links = join( '","', $social_links );
1449
- $social_link_schema = <<<END
1450
- <script type="application/ld+json">
1451
- { "@context" : "http://schema.org",
1452
- "@type" : "{$social_type}",
1453
- "name" : "{$social_name}",
1454
- "url" : "{$home_url}",
1455
- "sameAs" : ["{$social_links}"]
1456
- }
1457
- </script>
1458
-
1459
- END;
1460
- }
1461
- echo apply_filters( 'aiosp_opengraph_social_link_schema', $social_link_schema );
1462
- }
1463
-
1464
- /**
1465
- * Do / adds opengraph properties to meta.
1466
- * @since 2.3.11
1467
- *
1468
- * @global array $aioseop_options AIOSEOP plugin options.
1469
- */
1470
- public function do_opengraph() {
1471
- global $aioseop_options;
1472
- if ( ! empty( $aioseop_options )
1473
- && ! empty( $aioseop_options['aiosp_schema_markup'] )
1474
- ) {
1475
- add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1476
- }
1477
- if ( ! defined( 'DOING_AJAX' ) ) {
1478
- add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1479
- // Add social meta to AMP plugin.
1480
- if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true ) {
1481
- add_action( 'amp_post_template_head', array( &$this, 'add_meta' ), 12 );
1482
- }
1483
- }
1484
- }
1485
-
1486
- /**
1487
- * Set up types.
1488
- *
1489
- * @since ?
1490
- * @since 2.3.15 Change to website for homepage and blog post index page, default to object.
1491
- */
1492
- function type_setup() {
1493
- $this->type = 'object'; // Default to type object if we don't have some other rule.
1494
-
1495
- if ( is_home() || is_front_page() ) {
1496
- $this->type = 'website'; // Home page and blog page should be website.
1497
- } elseif ( is_singular() && $this->option_isset( 'types' ) ) {
1498
- $metabox = $this->get_current_options( array(), 'settings' );
1499
- $current_post_type = get_post_type();
1500
- if ( ! empty( $metabox['aioseop_opengraph_settings_category'] ) ) {
1501
- $this->type = $metabox['aioseop_opengraph_settings_category'];
1502
- } elseif ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
1503
- $this->type = $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ];
1504
- }
1505
- }
1506
- }
1507
-
1508
- /**
1509
- * Inits hooks and others for admin init.
1510
- * action:admin_init.
1511
- *
1512
- * @since 2.3.11
1513
- * @since 2.4.14 Refactored function name, and new filter added for defaults and missing term metabox.
1514
- */
1515
- function admin_init() {
1516
- add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1517
- add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1518
- add_filter( $this->get_prefix( 'settings' ) . 'default_options', array(
1519
- &$this,
1520
- 'filter_default_options',
1521
- ), 10, 2 );
1522
- add_filter(
1523
- $this->get_prefix( 'settings' ) . 'filter_metabox_options', array(
1524
- &$this,
1525
- 'filter_metabox_options',
1526
- ), 10, 3
1527
- );
1528
- add_filter(
1529
- $this->get_prefix( 'settings' ) . 'filter_term_metabox_options', array(
1530
- &$this,
1531
- 'filter_metabox_options',
1532
- ), 10, 3
1533
- );
1534
- $post_types = $this->get_post_type_titles();
1535
- $rempost = array(
1536
- 'revision' => 1,
1537
- 'nav_menu_item' => 1,
1538
- 'custom_css' => 1,
1539
- 'customize_changeset' => 1,
1540
- );
1541
- $post_types = array_diff_key( $post_types, $rempost );
1542
- $this->default_options['types']['initial_options'] = $post_types;
1543
- foreach ( $post_types as $slug => $name ) {
1544
- $field = $slug . '_fb_object_type';
1545
- $this->default_options[ $field ] = array(
1546
- 'name' => "$name " . __( 'Object Type', 'all-in-one-seo-pack' ) . "<br />($slug)",
1547
- 'type' => 'select',
1548
- 'style' => '',
1549
- 'initial_options' => $this->fb_object_types,
1550
- 'default' => 'article',
1551
- 'condshow' => array( 'aiosp_opengraph_types\[\]' => $slug ),
1552
- );
1553
- $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1554
- $this->help_anchors[ $field ] = '#content-object-types';
1555
- $this->locations['opengraph']['options'][] = $field;
1556
- $this->layout['facebook']['options'][] = $field;
1557
- }
1558
- $this->setting_options();
1559
- $this->add_help_text_links();
1560
-
1561
- }
1562
-
1563
- function get_all_images( $options = null, $p = null ) {
1564
- static $img = array();
1565
- if ( ! is_array( $options ) ) {
1566
- $options = array();
1567
- }
1568
- if ( ! empty( $this->options['aiosp_opengraph_meta_key'] ) ) {
1569
- $options['meta_key'] = $this->options['aiosp_opengraph_meta_key'];
1570
- }
1571
- if ( empty( $img ) ) {
1572
- $size = apply_filters( 'post_thumbnail_size', 'large' );
1573
- $default = $this->get_the_image_by_default();
1574
- if ( ! empty( $default ) ) {
1575
- $default = set_url_scheme( $default );
1576
- $img[ $default ] = 0;
1577
- }
1578
- $img = array_merge( $img, parent::get_all_images( $options, null ) );
1579
- }
1580
-
1581
- if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1582
- $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1583
- }
1584
-
1585
- if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1586
- $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1587
- $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1588
- }
1589
-
1590
- if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1591
- $image['author'] = $author_img;
1592
- }
1593
- $image = array_flip( $img );
1594
- $images = array();
1595
- if ( ! empty( $image ) ) {
1596
- foreach ( $image as $k => $v ) {
1597
- $images[ $v ] = '<img height=150 src="' . $v . '">';
1598
- }
1599
- }
1600
-
1601
- return array( $image, $images );
1602
- }
1603
-
1604
- function get_the_image_by_author( $options = null, $p = null ) {
1605
- if ( $p === null ) {
1606
- global $post;
1607
- } else {
1608
- $post = $p;
1609
- }
1610
- if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
1611
- $matches = array();
1612
- $get_avatar = get_avatar( $post->post_author, 300 );
1613
- if ( preg_match( "/src='(.*?)'/i", $get_avatar, $matches ) ) {
1614
- return $matches[1];
1615
- }
1616
- }
1617
-
1618
- return false;
1619
- }
1620
-
1621
- function get_the_image( $options = null, $p = null ) {
1622
- $meta_key = $this->options['aiosp_opengraph_meta_key'];
1623
-
1624
- return parent::get_the_image( array( 'meta_key' => $meta_key ), $p );
1625
- }
1626
-
1627
- function get_the_image_by_default( $args = array() ) {
1628
- return $this->options['aiosp_opengraph_dimg'];
1629
- }
1630
-
1631
- function settings_update() {
1632
-
1633
- }
1634
-
1635
- /**
1636
- * Enqueue our file upload scripts and styles.
1637
- * @param $hook
1638
- */
1639
- function og_admin_enqueue_scripts( $hook ) {
1640
-
1641
- if ( 'all-in-one-seo_page_aiosp_opengraph' != $hook && 'term.php' != $hook ) {
1642
- // Only enqueue if we're on the social module settings page.
1643
- return;
1644
- }
1645
-
1646
- wp_enqueue_script( 'media-upload' );
1647
- wp_enqueue_script( 'thickbox' );
1648
- wp_enqueue_style( 'thickbox' );
1649
- wp_enqueue_media();
1650
- }
1651
-
1652
- function save_tax_data( $term_id, $tt_id, $taxonomy ) {
1653
- static $update = false;
1654
- if ( $update ) {
1655
- return;
1656
- }
1657
- if ( $this->locations !== null ) {
1658
- foreach ( $this->locations as $k => $v ) {
1659
- if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
1660
- $opts = $this->default_options( $k );
1661
- $options = array();
1662
- $update = false;
1663
- foreach ( $opts as $l => $o ) {
1664
- if ( isset( $_POST[ $l ] ) ) {
1665
- $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
1666
- $options[ $l ] = esc_attr( $options[ $l ] );
1667
- $update = true;
1668
- }
1669
- }
1670
- if ( $update ) {
1671
- $prefix = $this->get_prefix( $k );
1672
- $options = apply_filters( $prefix . 'filter_term_metabox_options', $options, $k, $term_id );
1673
- update_term_meta( $term_id, '_' . $prefix . $k, $options );
1674
- }
1675
- }
1676
- }
1677
- }
1678
- }
1679
-
1680
- /**
1681
- * Returns the placeholder filtered and ready for DOM display.
1682
- * filter:aioseop_opengraph_placeholder
1683
- * @since 2.4.14
1684
- *
1685
- * @param mixed $placeholder Placeholder to be filtered.
1686
- * @param string $type Type of the value to be filtered.
1687
- *
1688
- * @return string
1689
- */
1690
- public function filter_placeholder( $placeholder, $type = 'text' ) {
1691
- return strip_tags( trim( $placeholder ) );
1692
- }
1693
-
1694
- /**
1695
- * Returns filtered default options.
1696
- * filter:{prefix}default_options
1697
- * @since 2.4.13
1698
- *
1699
- * @param array $options Default options.
1700
- * @param string $location Location.
1701
- *
1702
- * @return array
1703
- */
1704
- public function filter_default_options( $options, $location ) {
1705
- if ( $location === 'settings' ) {
1706
- $prefix = $this->get_prefix( $location ) . $location . '_';
1707
- // Add image checker as default
1708
- $options[ $prefix . 'customimg_checker' ] = 0;
1709
- }
1710
- return $options;
1711
- }
1712
-
1713
- /**
1714
- * Returns facebook debug script and link.
1715
- * @since 2.4.14
1716
- *
1717
- * @return string
1718
- */
1719
- private function get_facebook_debug() {
1720
- ob_start();
1721
- ?>
1722
- <script>
1723
- jQuery(document).ready(function () {
1724
- var snippet = jQuery("#aioseop_snippet_link");
1725
- if (snippet.length === 0) {
1726
- jQuery("#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
1727
- } else {
1728
- snippet = snippet.html();
1729
- jQuery("#aioseop_opengraph_settings_facebook_debug")
1730
- .attr("href", "https://developers.facebook.com/tools/debug/sharing/?q=" + snippet);
1731
- }
1732
- });
1733
- </script>
1734
- <a name="aioseop_opengraph_settings_facebook_debug"
1735
- id="aioseop_opengraph_settings_facebook_debug"
1736
- class="button-primary"
1737
- href=""
1738
- target="_blank"
1739
- ><?php echo __( 'Debug This Post', 'all-in-one-seo-pack' ); ?></a>
1740
- <?php
1741
- return ob_get_clean();
1742
- }
1743
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1744
  }
1
+ <?php
2
+ /**
3
+ * The Opengraph class.
4
+ *
5
+ * @package All-in-One-SEO-Pack
6
+ * @version 2.3.16
7
+ */
8
+ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
9
+ class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
10
+ var $fb_object_types;
11
+ var $type;
12
+
13
+ /**
14
+ * Module constructor.
15
+ *
16
+ * @since 2.3.14 Added display filter.
17
+ * @since 2.3.16 #1066 Force init on constructor.
18
+ */
19
+ function __construct() {
20
+ add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
21
+
22
+ $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
23
+ $this->prefix = 'aiosp_opengraph_'; // option prefix
24
+ $this->file = __FILE__; // the current file
25
+ $this->fb_object_types = array(
26
+ 'Activities' => array(
27
+ 'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
28
+ 'sport' => __( 'Sport', 'all-in-one-seo-pack' ),
29
+ ),
30
+ 'Businesses' => array(
31
+ 'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
32
+ 'company' => __( 'Company', 'all-in-one-seo-pack' ),
33
+ 'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
34
+ 'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
35
+ 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' ),
36
+ ),
37
+ 'Groups' => array(
38
+ 'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
39
+ 'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
40
+ 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' ),
41
+ ),
42
+ 'Organizations' => array(
43
+ 'band' => __( 'Band', 'all-in-one-seo-pack' ),
44
+ 'government' => __( 'Government', 'all-in-one-seo-pack' ),
45
+ 'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
46
+ 'school' => __( 'School', 'all-in-one-seo-pack' ),
47
+ 'university' => __( 'University', 'all-in-one-seo-pack' ),
48
+ ),
49
+ 'People' => array(
50
+ 'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
51
+ 'athlete' => __( 'Athlete', 'all-in-one-seo-pack' ),
52
+ 'author' => __( 'Author', 'all-in-one-seo-pack' ),
53
+ 'director' => __( 'Director', 'all-in-one-seo-pack' ),
54
+ 'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
55
+ 'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
56
+ 'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
57
+ 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' ),
58
+ ),
59
+ 'Places' => array(
60
+ 'city' => __( 'City', 'all-in-one-seo-pack' ),
61
+ 'country' => __( 'Country', 'all-in-one-seo-pack' ),
62
+ 'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
63
+ 'state_province' => __( 'State Province', 'all-in-one-seo-pack' ),
64
+ ),
65
+ 'Products and Entertainment' => array(
66
+ 'album' => __( 'Album', 'all-in-one-seo-pack' ),
67
+ 'book' => __( 'Book', 'all-in-one-seo-pack' ),
68
+ 'drink' => __( 'Drink', 'all-in-one-seo-pack' ),
69
+ 'food' => __( 'Food', 'all-in-one-seo-pack' ),
70
+ 'game' => __( 'Game', 'all-in-one-seo-pack' ),
71
+ 'movie' => __( 'Movie', 'all-in-one-seo-pack' ),
72
+ 'product' => __( 'Product', 'all-in-one-seo-pack' ),
73
+ 'song' => __( 'Song', 'all-in-one-seo-pack' ),
74
+ 'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
75
+ 'episode' => __( 'Episode', 'all-in-one-seo-pack' ),
76
+ ),
77
+ 'Websites' => array(
78
+ 'article' => __( 'Article', 'all-in-one-seo-pack' ),
79
+ 'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
80
+ 'website' => __( 'Website', 'all-in-one-seo-pack' ),
81
+ ),
82
+ );
83
+ parent::__construct();
84
+
85
+ $this->help_text = array(
86
+ 'setmeta' => __( 'Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.', 'all-in-one-seo-pack' ),
87
+ 'key' => __( 'Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/', 'all-in-one-seo-pack' ),
88
+ 'appid' => __( 'Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register', 'all-in-one-seo-pack' ),
89
+ 'title_shortcodes' => __( 'Run shortcodes that appear in social title meta tags.', 'all-in-one-seo-pack' ),
90
+ 'description_shortcodes' => __( 'Run shortcodes that appear in social description meta tags.', 'all-in-one-seo-pack' ),
91
+ 'sitename' => __( 'The Site Name is the name that is used to identify your website.', 'all-in-one-seo-pack' ),
92
+ 'hometitle' => __( 'The Home Title is the Open Graph title for your home page.', 'all-in-one-seo-pack' ),
93
+ 'description' => __( 'The Home Description is the Open Graph description for your home page.', 'all-in-one-seo-pack' ),
94
+ 'homeimage' => __( 'The Home Image is the Open Graph image for your home page.', 'all-in-one-seo-pack' ),
95
+ 'generate_descriptions' => __( 'This option will auto generate your Open Graph descriptions from your post content instead of your post excerpt. WooCommerce users should read the documentation regarding this setting.', 'all-in-one-seo-pack' ),
96
+ 'defimg' => __( 'This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.', 'all-in-one-seo-pack' ),
97
+ 'fallback' => __( 'This option lets you fall back to the default image if no image could be found above.', 'all-in-one-seo-pack' ),
98
+ 'dimg' => __( 'This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.', 'all-in-one-seo-pack' ),
99
+ 'dimgwidth' => __( 'This option lets you set a default width for your images, where unspecified.', 'all-in-one-seo-pack' ),
100
+ 'dimgheight' => __( 'This option lets you set a default height for your images, where unspecified.', 'all-in-one-seo-pack' ),
101
+ 'meta_key' => __( 'Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.', 'all-in-one-seo-pack' ),
102
+ 'image' => __( 'This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.', 'all-in-one-seo-pack' ),
103
+ 'customimg' => __( 'This option lets you upload an image to use as the Open Graph image for this Page or Post.', 'all-in-one-seo-pack' ),
104
+ 'imagewidth' => __( 'Enter the width for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
105
+ 'imageheight' => __( 'Enter the height for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
106
+ 'video' => __( 'This option lets you specify a link to the Open Graph video used on this Page or Post.', 'all-in-one-seo-pack' ),
107
+ 'videowidth' => __( 'Enter the width for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
108
+ 'videoheight' => __( 'Enter the height for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
109
+ 'defcard' => __( 'Select the default type of Twitter Card to display.', 'all-in-one-seo-pack' ),
110
+ 'setcard' => __( 'Select the Twitter Card type to use for this Page or Post, overriding the default setting.', 'all-in-one-seo-pack' ),
111
+ 'twitter_site' => __( 'Enter the Twitter username associated with your website here.', 'all-in-one-seo-pack' ),
112
+ 'twitter_creator' => __( 'Allows your authors to be identified by their Twitter usernames as content creators on the Twitter cards for their posts.', 'all-in-one-seo-pack' ),
113
+ 'twitter_domain' => __( 'Enter the name of your website here.', 'all-in-one-seo-pack' ),
114
+ 'customimg_twitter' => __( 'This option lets you upload an image to use as the Twitter image for this Page or Post.', 'all-in-one-seo-pack' ),
115
+ 'gen_tags' => __( 'Automatically generate article tags for Facebook type article when not provided.', 'all-in-one-seo-pack' ),
116
+ 'gen_keywords' => __( 'Use keywords in generated article tags.', 'all-in-one-seo-pack' ),
117
+ 'gen_categories' => __( 'Use categories in generated article tags.', 'all-in-one-seo-pack' ),
118
+ 'gen_post_tags' => __( 'Use post tags in generated article tags.', 'all-in-one-seo-pack' ),
119
+ 'types' => __( 'Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.', 'all-in-one-seo-pack' ),
120
+ 'title' => __( 'This is the Open Graph title of this Page or Post.', 'all-in-one-seo-pack' ),
121
+ 'desc' => __( 'This is the Open Graph description of this Page or Post.', 'all-in-one-seo-pack' ),
122
+ 'category' => __( 'Select the Open Graph type that best describes the content of this Page or Post.', 'all-in-one-seo-pack' ),
123
+ 'facebook_debug' => __( 'Press this button to have Facebook re-fetch and debug this page.', 'all-in-one-seo-pack' ),
124
+ 'section' => __( 'This Open Graph meta allows you to add a general section name that best describes this content.', 'all-in-one-seo-pack' ),
125
+ 'tag' => __( 'This Open Graph meta allows you to add a list of keywords that best describe this content.', 'all-in-one-seo-pack' ),
126
+ 'facebook_publisher' => __( 'Link articles to the Facebook page associated with your website.', 'all-in-one-seo-pack' ),
127
+ 'facebook_author' => __( 'Allows your authors to be identified by their Facebook pages as content authors on the Opengraph meta for their articles.', 'all-in-one-seo-pack' ),
128
+ 'person_or_org' => __( 'Are the social profile links for your website for a person or an organization?', 'all-in-one-seo-pack' ),
129
+ 'profile_links' => __( "Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack' ),
130
+ 'social_name' => __( 'Add the name of the person or organization who owns these profiles.', 'all-in-one-seo-pack' ),
131
+ );
132
+
133
+ $this->help_anchors = array(
134
+ 'title_shortcodes' => '#run-shortcodes-in-title',
135
+ 'description_shortcodes' => '#run-shortcodes-in-description',
136
+ 'generate_descriptions' => '#auto-generate-og-descriptions',
137
+ 'setmeta' => '#use-aioseo-title-and-description',
138
+ 'sitename' => '#site-name',
139
+ 'hometitle' => '#home-title-and-description',
140
+ 'description' => '#home-title-and-description',
141
+ 'homeimage' => '#home-image',
142
+ 'defimg' => '#select-og-image-source',
143
+ 'fallback' => '#use-default-if-no-image-found',
144
+ 'dimg' => '#default-og-image',
145
+ 'dimgwidth' => '#default-image-width',
146
+ 'dimgheight' => '#default-image-height',
147
+ 'meta_key' => '#use-custom-field-for-image',
148
+ 'profile_links' => '#social-profile-links',
149
+ 'person_or_org' => '#social-profile-links',
150
+ 'social_name' => '#social-profile-links',
151
+ 'key' => '#facebook-admin-id',
152
+ 'appid' => '#facebook-app-id',
153
+ 'gen_tags' => '#automatically-generate-article-tags',
154
+ 'gen_keywords' => '#use-keywords-in-article-tags',
155
+ 'gen_categories' => '#use-categories-in-article-tags',
156
+ 'gen_post_tags' => '#use-post-tags-in-article-tags',
157
+ 'facebook_publisher' => '#show-facebook-publisher-on-articles',
158
+ 'facebook_author' => '#show-facebook-author-on-articles',
159
+ 'types' => '#enable-facebook-meta-for',
160
+ 'defcard' => '#default-twitter-card',
161
+ 'twitter_site' => '#twitter-site',
162
+ 'twitter_creator' => '#show-twitter-author',
163
+ 'twitter_domain' => '#twitter-domain',
164
+ 'scan_header' => '#scan-social-meta',
165
+ 'title' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#title',
166
+ 'desc' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#description',
167
+ 'image' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#image',
168
+ 'customimg' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-image',
169
+ 'imagewidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
170
+ 'imageheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
171
+ 'video' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-video',
172
+ 'videowidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
173
+ 'videoheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
174
+ 'category' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-object-type',
175
+ 'facebook_debug' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-debug',
176
+ 'section' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-section',
177
+ 'tag' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-tags',
178
+ 'setcard' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#twitter-card-type',
179
+ 'customimg_twitter' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-twitter-image',
180
+ );
181
+
182
+ if ( is_admin() ) {
183
+ add_action( 'admin_init', array( $this, 'admin_init' ), 5 );
184
+ } else {
185
+ add_action( 'wp', array( $this, 'type_setup' ) );
186
+ }
187
+
188
+ if ( ! is_admin() || defined( 'DOING_AJAX' ) || ( defined( 'AIOSEOP_UNIT_TESTING' ) && AIOSEOP_UNIT_TESTING ) ) {
189
+ $this->do_opengraph();
190
+ }
191
+ // Set variables after WordPress load.
192
+ add_action( 'init', array( &$this, 'init' ), 999999 );
193
+ add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
194
+ // Force refresh of Facebook cache.
195
+ add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
196
+ add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
197
+ add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
198
+ // Adds special filters
199
+ add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
200
+ // Call to init to generate menus
201
+ $this->init();
202
+ }
203
+
204
+ /**
205
+ * Hook called after WordPress has been loaded.
206
+ *
207
+ * @since 2.4.14
208
+ */
209
+ public function init() {
210
+ $count_desc = __( ' characters. Open Graph allows up to a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
211
+ // Create default options
212
+ $this->default_options = array(
213
+ 'scan_header' => array(
214
+ 'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
215
+ 'type' => 'custom',
216
+ 'save' => true,
217
+ ),
218
+ 'setmeta' => array(
219
+ 'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
220
+ 'type' => 'checkbox',
221
+ ),
222
+ 'key' => array(
223
+ 'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
224
+ 'default' => '',
225
+ 'type' => 'text',
226
+ ),
227
+ 'appid' => array(
228
+ 'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
229
+ 'default' => '',
230
+ 'type' => 'text',
231
+ ),
232
+ 'title_shortcodes' => array(
233
+ 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ),
234
+ ),
235
+ 'description_shortcodes' => array(
236
+ 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ),
237
+ ),
238
+ 'sitename' => array(
239
+ 'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
240
+ 'default' => get_bloginfo( 'name' ),
241
+ 'type' => 'text',
242
+ ),
243
+ 'hometitle' => array(
244
+ 'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
245
+ 'default' => '',
246
+ 'type' => 'textarea',
247
+ 'condshow' => array(
248
+ 'aiosp_opengraph_setmeta' => array(
249
+ 'lhs' => 'aiosp_opengraph_setmeta',
250
+ 'op' => '!=',
251
+ 'rhs' => 'on',
252
+ ),
253
+ ),
254
+ ),
255
+ 'description' => array(
256
+ 'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
257
+ 'default' => '',
258
+ 'type' => 'textarea',
259
+ 'condshow' => array(
260
+ 'aiosp_opengraph_setmeta' => array(
261
+ 'lhs' => 'aiosp_opengraph_setmeta',
262
+ 'op' => '!=',
263
+ 'rhs' => 'on',
264
+ ),
265
+ ),
266
+ ),
267
+ 'homeimage' => array(
268
+ 'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
269
+ 'type' => 'image',
270
+ ),
271
+ 'generate_descriptions' => array(
272
+ 'name' => __( 'Use Content For Autogenerated OG Descriptions', 'all-in-one-seo-pack' ),
273
+ 'default' => 0,
274
+ ),
275
+ 'defimg' => array(
276
+ 'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
277
+ 'type' => 'select',
278
+ 'initial_options' => array(
279
+ '' => __( 'Default Image' ),
280
+ 'featured' => __( 'Featured Image' ),
281
+ 'attach' => __( 'First Attached Image' ),
282
+ 'content' => __( 'First Image In Content' ),
283
+ 'custom' => __( 'Image From Custom Field' ),
284
+ 'author' => __( 'Post Author Image' ),
285
+ 'auto' => __( 'First Available Image' ),
286
+ ),
287
+ ),
288
+ 'fallback' => array(
289
+ 'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
290
+ 'type' => 'checkbox',
291
+ ),
292
+ 'dimg' => array(
293
+ 'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
294
+ 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
295
+ 'type' => 'image',
296
+ ),
297
+ 'dimgwidth' => array(
298
+ 'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
299
+ 'type' => 'text',
300
+ 'default' => '',
301
+ ),
302
+ 'dimgheight' => array(
303
+ 'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
304
+ 'type' => 'text',
305
+ 'default' => '',
306
+ ),
307
+ 'meta_key' => array(
308
+ 'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
309
+ 'type' => 'text',
310
+ 'default' => '',
311
+ ),
312
+ 'image' => array(
313
+ 'name' => __( 'Image', 'all-in-one-seo-pack' ),
314
+ 'type' => 'radio',
315
+ 'initial_options' => array(
316
+ 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">',
317
+ ),
318
+ ),
319
+ 'customimg' => array(
320
+ 'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
321
+ 'type' => 'image',
322
+ ),
323
+ 'imagewidth' => array(
324
+ 'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
325
+ 'type' => 'text',
326
+ 'default' => '',
327
+ ),
328
+ 'imageheight' => array(
329
+ 'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
330
+ 'type' => 'text',
331
+ 'default' => '',
332
+ ),
333
+ 'video' => array(
334
+ 'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
335
+ 'type' => 'text',
336
+ ),
337
+ 'videowidth' => array(
338
+ 'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
339
+ 'type' => 'text',
340
+ 'default' => '',
341
+ 'condshow' => array(
342
+ 'aioseop_opengraph_settings_video' => array(
343
+ 'lhs' => 'aioseop_opengraph_settings_video',
344
+ 'op' => '!=',
345
+ 'rhs' => '',
346
+ ),
347
+ ),
348
+ ),
349
+ 'videoheight' => array(
350
+ 'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
351
+ 'type' => 'text',
352
+ 'default' => '',
353
+ 'condshow' => array(
354
+ 'aioseop_opengraph_settings_video' => array(
355
+ 'lhs' => 'aioseop_opengraph_settings_video',
356
+ 'op' => '!=',
357
+ 'rhs' => '',
358
+ ),
359
+ ),
360
+ ),
361
+ 'defcard' => array(
362
+ 'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
363
+ 'type' => 'select',
364
+ 'default' => 'summary',
365
+ 'initial_options' => array(
366
+ 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
367
+ 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
368
+
369
+ /*
370
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
371
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
372
+ */
373
+ ),
374
+ ),
375
+ 'setcard' => array(
376
+ 'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
377
+ 'type' => 'select',
378
+ 'initial_options' => array(
379
+ 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
380
+ 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
381
+
382
+ /*
383
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
384
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
385
+ */
386
+ ),
387
+ ),
388
+ 'twitter_site' => array(
389
+ 'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
390
+ 'type' => 'text',
391
+ 'default' => '',
392
+ ),
393
+ 'twitter_creator' => array(
394
+ 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' ),
395
+ ),
396
+ 'twitter_domain' => array(
397
+ 'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
398
+ 'type' => 'text',
399
+ 'default' => '',
400
+ ),
401
+ 'customimg_twitter' => array(
402
+ 'name' => __( 'Custom Twitter Image', 'all-in-one-seo-pack' ),
403
+ 'type' => 'image',
404
+ ),
405
+ 'gen_tags' => array(
406
+ 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' ),
407
+ ),
408
+ 'gen_keywords' => array(
409
+ 'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
410
+ 'default' => 'on',
411
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
412
+ ),
413
+ 'gen_categories' => array(
414
+ 'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
415
+ 'default' => 'on',
416
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
417
+ ),
418
+ 'gen_post_tags' => array(
419
+ 'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
420
+ 'default' => 'on',
421
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
422
+ ),
423
+ 'types' => array(
424
+ 'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
425
+ 'type' => 'multicheckbox',
426
+ 'default' => array( 'post' => 'post', 'page' => 'page' ),
427
+ 'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
428
+ ),
429
+ 'title' => array(
430
+ 'name' => __( 'Title', 'all-in-one-seo-pack' ),
431
+ 'default' => '',
432
+ 'type' => 'text',
433
+ 'size' => 95,
434
+ 'count' => 1,
435
+ 'count_desc' => $count_desc,
436
+ ),
437
+ 'desc' => array(
438
+ 'name' => __( 'Description', 'all-in-one-seo-pack' ),
439
+ 'default' => '',
440
+ 'type' => 'textarea',
441
+ 'cols' => 250,
442
+ 'rows' => 4,
443
+ 'count' => 1,
444
+ 'count_desc' => $count_desc,
445
+ ),
446
+ 'category' => array(
447
+ 'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
448
+ 'type' => 'select',
449
+ 'style' => '',
450
+ 'default' => '',
451
+ 'initial_options' => $this->fb_object_types,
452
+ ),
453
+ 'facebook_debug' => array(
454
+ 'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
455
+ 'type' => 'html',
456
+ 'save' => false,
457
+ 'default' => $this->get_facebook_debug(),
458
+ ),
459
+ 'section' => array(
460
+ 'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
461
+ 'type' => 'text',
462
+ 'default' => '',
463
+ 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
464
+ ),
465
+ 'tag' => array(
466
+ 'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
467
+ 'type' => 'text',
468
+ 'default' => '',
469
+ 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
470
+ ),
471
+ 'facebook_publisher' => array(
472
+ 'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
473
+ 'type' => 'text',
474
+ 'default' => '',
475
+ ),
476
+ 'facebook_author' => array(
477
+ 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ),
478
+ ),
479
+ 'profile_links' => array(
480
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
481
+ 'type' => 'textarea',
482
+ 'cols' => 60,
483
+ 'rows' => 5,
484
+ ),
485
+ 'person_or_org' => array(
486
+ 'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
487
+ 'type' => 'radio',
488
+ 'initial_options' => array(
489
+ 'person' => __( 'Person', 'all-in-one-seo-pack' ),
490
+ 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
491
+ ),
492
+ ),
493
+ 'social_name' => array(
494
+ 'name' => __( 'Associated Name', 'all-in-one-seo-pack' ),
495
+ 'type' => 'text',
496
+ 'default' => '',
497
+ ),
498
+ );
499
+ // load initial options / set defaults
500
+ $this->update_options();
501
+ $display = array();
502
+ if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
503
+ $display = $this->options['aiosp_opengraph_types'];
504
+ }
505
+ $this->locations = array(
506
+ 'opengraph' => array(
507
+ 'name' => $this->name,
508
+ 'prefix' => 'aiosp_',
509
+ 'type' => 'settings',
510
+ 'options' => array(
511
+ 'scan_header',
512
+ 'setmeta',
513
+ 'key',
514
+ 'appid',
515
+ 'sitename',
516
+ 'title_shortcodes',
517
+ 'description_shortcodes',
518
+ 'hometitle',
519
+ 'description',
520
+ 'homeimage',
521
+ 'generate_descriptions',
522
+ 'defimg',
523
+ 'fallback',
524
+ 'dimg',
525
+ 'dimgwidth',
526
+ 'dimgheight',
527
+ 'meta_key',
528
+ 'defcard',
529
+ 'profile_links',
530
+ 'person_or_org',
531
+ 'social_name',
532
+ 'twitter_site',
533
+ 'twitter_creator',
534
+ 'twitter_domain',
535
+ 'gen_tags',
536
+ 'gen_keywords',
537
+ 'gen_categories',
538
+ 'gen_post_tags',
539
+ 'types',
540
+ 'facebook_publisher',
541
+ 'facebook_author',
542
+ ),
543
+ ),
544
+ 'settings' => array(
545
+ 'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
546
+ 'type' => 'metabox',
547
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/',
548
+ 'options' => array(
549
+ 'title',
550
+ 'desc',
551
+ 'image',
552
+ 'customimg',
553
+ 'imagewidth',
554
+ 'imageheight',
555
+ 'video',
556
+ 'videowidth',
557
+ 'videoheight',
558
+ 'category',
559
+ 'facebook_debug',
560
+ 'section',
561
+ 'tag',
562
+ 'setcard',
563
+ 'customimg_twitter',
564
+ ),
565
+ 'display' => apply_filters( 'aioseop_opengraph_display', $display ),
566
+ 'prefix' => 'aioseop_opengraph_',
567
+ ),
568
+ );
569
+ $this->layout = array(
570
+ 'home' => array(
571
+ 'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
572
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
573
+ 'options' => array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage' ),
574
+ ),
575
+ 'image' => array(
576
+ 'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
577
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
578
+ 'options' => array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
579
+ ),
580
+ 'links' => array(
581
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
582
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
583
+ 'options' => array( 'profile_links', 'person_or_org', 'social_name' ),
584
+ ),
585
+ 'facebook' => array(
586
+ 'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
587
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
588
+ 'options' => array(
589
+ 'key',
590
+ 'appid',
591
+ 'types',
592
+ 'gen_tags',
593
+ 'gen_keywords',
594
+ 'gen_categories',
595
+ 'gen_post_tags',
596
+ 'facebook_publisher',
597
+ 'facebook_author',
598
+ ),
599
+ ),
600
+ 'twitter' => array(
601
+ 'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
602
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
603
+ 'options' => array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
604
+ ),
605
+ 'default' => array(
606
+ 'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
607
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
608
+ 'options' => array(), // this is set below, to the remaining options -- pdb
609
+ ),
610
+ 'scan_meta' => array(
611
+ 'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
612
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
613
+ 'options' => array( 'scan_header' ),
614
+ ),
615
+ );
616
+ $other_options = array();
617
+ foreach ( $this->layout as $k => $v ) {
618
+ $other_options = array_merge( $other_options, $v['options'] );
619
+ }
620
+
621
+ $this->layout['default']['options'] = array_diff( array_keys( $this->default_options ), $other_options );
622
+ }
623
+
624
+ /**
625
+ * Forces FaceBook OpenGraph to refresh its cache when a post is changed to
626
+ *
627
+ * @param $new_status
628
+ * @param $old_status
629
+ * @param $post
630
+ *
631
+ * @todo this and force_fb_refresh_update can probably have the remote POST extracted out.
632
+ *
633
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
634
+ * @since 2.3.11
635
+ */
636
+ function force_fb_refresh_transition( $new_status, $old_status, $post ) {
637
+ if ( 'publish' !== $new_status ) {
638
+ return;
639
+ }
640
+ if ( 'future' !== $old_status ) {
641
+ return;
642
+ }
643
+
644
+ $current_post_type = get_post_type();
645
+
646
+ // Only ping Facebook if Social SEO is enabled on this post type.
647
+ if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
648
+ $post_url = aioseop_get_permalink( $post->ID );
649
+ $endpoint = sprintf(
650
+ 'https://graph.facebook.com/?%s', http_build_query(
651
+ array(
652
+ 'id' => $post_url,
653
+ 'scrape' => true,
654
+ )
655
+ )
656
+ );
657
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
658
+ }
659
+ }
660
+
661
+ /**
662
+ * Forces FaceBook OpenGraph refresh on update.
663
+ *
664
+ * @param $post_id
665
+ * @param $post_after
666
+ *
667
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
668
+ * @since 2.3.11
669
+ */
670
+ function force_fb_refresh_update( $post_id, $post_after ) {
671
+
672
+ $current_post_type = get_post_type();
673
+
674
+ // Only ping Facebook if Social SEO is enabled on this post type.
675
+ if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
676
+ $post_url = aioseop_get_permalink( $post_id );
677
+ $endpoint = sprintf(
678
+ 'https://graph.facebook.com/?%s', http_build_query(
679
+ array(
680
+ 'id' => $post_url,
681
+ 'scrape' => true,
682
+ )
683
+ )
684
+ );
685
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
686
+ }
687
+ }
688
+
689
+ function settings_page_init() {
690
+ add_filter( 'aiosp_output_option', array( $this, 'display_custom_options' ), 10, 2 );
691
+ }
692
+
693
+ function filter_options( $options, $location ) {
694
+ if ( $location == 'settings' ) {
695
+ $prefix = $this->get_prefix( $location ) . $location . '_';
696
+ list( $legacy, $images ) = $this->get_all_images( $options );
697
+ if ( isset( $options ) && isset( $options["{$prefix}image"] ) ) {
698
+ $thumbnail = $options["{$prefix}image"];
699
+ if ( ctype_digit( (string) $thumbnail ) || ( $thumbnail == 'post' ) ) {
700
+ if ( $thumbnail == 'post' ) {
701
+ $thumbnail = $images['post1'];
702
+ } elseif ( ! empty( $legacy[ $thumbnail ] ) ) {
703
+ $thumbnail = $legacy[ $thumbnail ];
704
+ }
705
+ }
706
+ $options["{$prefix}image"] = $thumbnail;
707
+ }
708
+ if ( empty( $options[ $prefix . 'image' ] ) ) {
709
+ $img = array_keys( $images );
710
+ if ( ! empty( $img ) && ! empty( $img[1] ) ) {
711
+ $options[ $prefix . 'image' ] = $img[1];
712
+ }
713
+ }
714
+ }
715
+
716
+ return $options;
717
+ }
718
+
719
+ /**
720
+ * Applies filter to module settings.
721
+ *
722
+ * @since 2.3.11
723
+ * @since 2.4.14 Added filter for description and title placeholders.
724
+ * @since 2.3.15 do_shortcode on description.
725
+ *
726
+ * @see [plugin]\admin\aioseop_module_class.php > display_options()
727
+ */
728
+ function filter_settings( $settings, $location, $current ) {
729
+ global $aiosp, $post;
730
+ if ( $location == 'opengraph' || $location == 'settings' ) {
731
+ $prefix = $this->get_prefix( $location ) . $location . '_';
732
+ if ( $location == 'opengraph' ) {
733
+ return $settings;
734
+ }
735
+ if ( $location == 'settings' ) {
736
+ list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
737
+ $opts = array( 'title', 'desc' );
738
+ $current_post_type = get_post_type();
739
+ if ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
740
+ $flat_type_list = array();
741
+ foreach ( $this->fb_object_types as $k => $v ) {
742
+ if ( is_array( $v ) ) {
743
+ $flat_type_list = array_merge( $flat_type_list, $v );
744
+ } else {
745
+ $flat_type_list[ $k ] = $v;
746
+ }
747
+ }
748
+ $settings[ $prefix . 'category' ]['initial_options'] = array_merge(
749
+ array(
750
+ $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
751
+ . $flat_type_list[ $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ],
752
+ ),
753
+ $settings[ $prefix . 'category' ]['initial_options']
754
+ );
755
+ }
756
+ if ( isset( $this->options['aiosp_opengraph_defcard'] ) ) {
757
+ $settings[ $prefix . 'setcard' ]['default'] = $this->options['aiosp_opengraph_defcard'];
758
+ }
759
+ $info = $aiosp->get_page_snippet_info();
760
+ $title = $info['title'];
761
+ $description = $info['description'];
762
+
763
+ // Description options
764
+ if ( is_object( $post ) ) {
765
+ // Always show excerpt
766
+ $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
767
+ ? $aiosp->trim_excerpt_without_filters(
768
+ $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
769
+ 1000
770
+ )
771
+ : $aiosp->trim_excerpt_without_filters(
772
+ $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ),
773
+ 1000
774
+ );
775
+ }
776
+
777
+ // #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
778
+ $screen = get_current_screen();
779
+ $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
780
+
781
+ // Add filters
782
+ $description = apply_filters( 'aioseop_description', $description, false, $ignore_php_version );
783
+ // Add placholders
784
+ $settings[ "{$prefix}title" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
785
+ $settings[ "{$prefix}desc" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
786
+ }
787
+ if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
788
+ foreach ( $opts as $opt ) {
789
+ if ( isset( $settings[ $prefix . $opt ] ) ) {
790
+ $settings[ $prefix . $opt ]['type'] = 'hidden';
791
+ $settings[ $prefix . $opt ]['label'] = 'none';
792
+ $settings[ $prefix . $opt ]['help_text'] = '';
793
+ unset( $settings[ $prefix . $opt ]['count'] );
794
+ }
795
+ }
796
+ }
797
+ }
798
+
799
+ return $settings;
800
+ }
801
+
802
+ /**
803
+ * Applies filter to module options.
804
+ * These will display in the "Social Settings" object tab.
805
+ * filter:{prefix}override_options
806
+ *
807
+ * @since 2.3.11
808
+ * @since 2.4.14 Overrides empty og:type values.
809
+ *
810
+ * @see [plugin]\admin\aioseop_module_class.php > display_options()
811
+ *
812
+ * @global array $aioseop_options Plugin options.
813
+ *
814
+ * @param array $options Current options.
815
+ * @param string $location Location where filter is called.
816
+ * @param array $settings Settings.
817
+ *
818
+ * @return array
819
+ */
820
+ function override_options( $options, $location, $settings ) {
821
+ global $aioseop_options;
822
+ // Prepare default and prefix
823
+ $prefix = $this->get_prefix( $location ) . $location . '_';
824
+ $opts = array();
825
+
826
+ foreach ( $settings as $k => $v ) {
827
+ if ( $v['save'] ) {
828
+ $opts[ $k ] = $v['default'];
829
+ }
830
+ }
831
+ foreach ( $options as $k => $v ) {
832
+ switch ( $k ) {
833
+ case $prefix . 'category':
834
+ if ( empty( $v ) ) {
835
+ // Get post type
836
+ $type = isset( get_current_screen()->post_type )
837
+ ? get_current_screen()->post_type
838
+ : null;
839
+ // Assign default from plugin options
840
+ if ( ! empty( $type )
841
+ && isset( $aioseop_options['modules'] )
842
+ && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
843
+ && isset( $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ] )
844
+ ) {
845
+ $options[ $prefix . 'category' ] =
846
+ $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ];
847
+ }
848
+ continue;
849
+ }
850
+ break;
851
+ }
852
+ if ( $v === null ) {
853
+ unset( $options[ $k ] );
854
+ }
855
+ }
856
+ $options = wp_parse_args( $options, $opts );
857
+
858
+ return $options;
859
+ }
860
+
861
+ /**
862
+ * Applies filter to metabox settings before they are saved.
863
+ * Sets custom as default if a custom image is uploaded.
864
+ * filter:{prefix}filter_metabox_options
865
+ * filter:{prefix}filter_term_metabox_options
866
+ *
867
+ * @since 2.3.11
868
+ * @since 2.4.14 Fixes for aioseop-pro #67 and other bugs found.
869
+ *
870
+ * @see [plugin]\admin\aioseop_module_class.php > save_post_data()
871
+ * @see [this file] > save_tax_data()
872
+ *
873
+ * @param array $options List of current options.
874
+ * @param string $location Location where filter is called.
875
+ * @param int $id Either post_id or term_id.
876
+ *
877
+ * @return array
878
+ */
879
+ function filter_metabox_options( $options, $location, $post_id ) {
880
+ if ( $location == 'settings' ) {
881
+ $prefix = $this->get_prefix( $location ) . $location . '_';
882
+ if ( isset( $options[ $prefix . 'customimg_checker' ] )
883
+ && $options[ $prefix . 'customimg_checker' ]
884
+ ) {
885
+ $options[ $prefix . 'image' ] = $options[ $prefix . 'customimg' ];
886
+ }
887
+ }
888
+ return $options;
889
+ }
890
+
891
+ /** Custom settings **/
892
+ function display_custom_options( $buf, $args ) {
893
+ if ( $args['name'] == 'aiosp_opengraph_scan_header' ) {
894
+ $buf .= '<div class="aioseop aioseop_options aiosp_opengraph_settings"><div class="aioseop_wrapper aioseop_custom_type" id="aiosp_opengraph_scan_header_wrapper"><div class="aioseop_input" id="aiosp_opengraph_scan_header" style="padding-left:20px;">';
895
+ $args['options']['type'] = 'submit';
896
+ $args['attr'] = " class='button-primary' ";
897
+ $args['value'] = $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
898
+ $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
899
+ $buf .= '<br /><br />' . $this->get_option_html( $args );
900
+ $buf .= '</div></div></div>';
901
+ }
902
+
903
+ return $buf;
904
+ }
905
+
906
+ function add_attributes( $output ) {
907
+ // avoid having duplicate meta tags
908
+ $type = $this->type;
909
+ if ( empty( $type ) ) {
910
+ $type = 'website';
911
+ }
912
+
913
+ $schema_types = array(
914
+ 'album' => 'MusicAlbum',
915
+ 'article' => 'Article',
916
+ 'bar' => 'BarOrPub',
917
+ 'blog' => 'Blog',
918
+ 'book' => 'Book',
919
+ 'cafe' => 'CafeOrCoffeeShop',
920
+ 'city' => 'City',
921
+ 'country' => 'Country',
922
+ 'episode' => 'Episode',
923
+ 'food' => 'FoodEvent',
924
+ 'game' => 'Game',
925
+ 'hotel' => 'Hotel',
926
+ 'landmark' => 'LandmarksOrHistoricalBuildings',
927
+ 'movie' => 'Movie',
928
+ 'product' => 'Product',
929
+ 'profile' => 'ProfilePage',
930
+ 'restaurant' => 'Restaurant',
931
+ 'school' => 'School',
932
+ 'sport' => 'SportsEvent',
933
+ 'website' => 'WebSite',
934
+ );
935
+
936
+ if ( ! empty( $schema_types[ $type ] ) ) {
937
+ $type = $schema_types[ $type ];
938
+ } else {
939
+ $type = 'WebSite';
940
+ }
941
+
942
+ $attributes = apply_filters(
943
+ $this->prefix . 'attributes', array(
944
+ 'prefix="og: http://ogp.me/ns#"',
945
+ )
946
+ );
947
+
948
+ foreach ( $attributes as $attr ) {
949
+ if ( strpos( $output, $attr ) === false ) {
950
+ $output .= "\n\t$attr ";
951
+ }
952
+ }
953
+
954
+ return $output;
955
+ }
956
+
957
+ /**
958
+ * Add our social meta.
959
+ *
960
+ * @since 1.0.0
961
+ * @since 2.3.11.5 Support for multiple fb_admins.
962
+ * @since 2.3.13 Adds filter:aioseop_description on description.
963
+ * @since 2.4.14 Fixes for aioseop-pro #67.
964
+ * @since 2.3.15 Always do_shortcode on descriptions, removed for titles.
965
+ *
966
+ * @global object $post Current WP_Post object.
967
+ * @global object $aiosp All in one seo plugin object.
968
+ * @global array $aioseop_options All in one seo plugin options.
969
+ * @global object $wp_query WP_Query global instance.
970
+ */
971
+ function add_meta() {
972
+ global $post, $aiosp, $aioseop_options, $wp_query;
973
+ $metabox = $this->get_current_options( array(), 'settings' );
974
+
975
+ // we have to introduce this because, for some reason, $this->options is not being populated at all while testing.
976
+ if ( defined( 'AIOSEOP_UNIT_TESTING' ) && AIOSEOP_UNIT_TESTING ) {
977
+ $this->options = $aioseop_options['modules']['aiosp_opengraph_options'];
978
+ }
979
+
980
+ $key = $this->options['aiosp_opengraph_key'];
981
+ $dimg = $this->options['aiosp_opengraph_dimg'];
982
+ $current_post_type = get_post_type();
983
+ $title = $description = $image = $video = '';
984
+ $type = $this->type;
985
+ $sitename = $this->options['aiosp_opengraph_sitename'];
986
+
987
+ $appid = isset( $this->options['aiosp_opengraph_appid'] ) ? $this->options['aiosp_opengraph_appid'] : '';
988
+
989
+ if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
990
+ $first_page = false;
991
+ if ( $aiosp->get_page_number() < 2 ) {
992
+ $first_page = true;
993
+ }
994
+ } else {
995
+ $first_page = true;
996
+ }
997
+ $url = $aiosp->aiosp_mrt_get_url( $wp_query );
998
+ $url = apply_filters( 'aioseop_canonical_url', $url );
999
+
1000
+ $setmeta = $this->options['aiosp_opengraph_setmeta'];
1001
+ $social_links = '';
1002
+ if ( is_front_page() ) {
1003
+ $title = $this->options['aiosp_opengraph_hometitle'];
1004
+ if ( $first_page ) {
1005
+ $description = $this->options['aiosp_opengraph_description'];
1006
+ if ( empty( $description ) ) {
1007
+ $description = get_bloginfo( 'description' );
1008
+ }
1009
+ }
1010
+ if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
1011
+ $thumbnail = $this->options['aiosp_opengraph_homeimage'];
1012
+ } else {
1013
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1014
+ }
1015
+
1016
+ /* If Use AIOSEO Title and Desc Selected */
1017
+ if ( $setmeta ) {
1018
+ $title = $aiosp->wp_title();
1019
+ if ( $first_page ) {
1020
+ $description = $aiosp->get_aioseop_description( $post );
1021
+ }
1022
+ }
1023
+
1024
+ /* Add some defaults */
1025
+ if ( empty( $title ) ) {
1026
+ $title = get_bloginfo( 'name' );
1027
+ }
1028
+ if ( empty( $sitename ) ) {
1029
+ $sitename = get_bloginfo( 'name' );
1030
+ }
1031
+
1032
+ if ( empty( $description ) && $first_page && ! empty( $post ) && ! post_password_required( $post ) ) {
1033
+
1034
+ if ( ! empty( $post->post_content ) || ! empty( $post->post_excerpt ) ) {
1035
+ $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ), 1000 );
1036
+
1037
+ if ( ! empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) {
1038
+ $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
1039
+ }
1040
+ }
1041
+ }
1042
+
1043
+ if ( empty( $description ) && $first_page ) {
1044
+ $description = get_bloginfo( 'description' );
1045
+ }
1046
+ if ( ! empty( $this->options['aiosp_opengraph_profile_links'] ) ) {
1047
+ $social_links = $this->options['aiosp_opengraph_profile_links'];
1048
+ if ( ! empty( $this->options['aiosp_opengraph_social_name'] ) ) {
1049
+ $social_name = $this->options['aiosp_opengraph_social_name'];
1050
+ } else {
1051
+ $social_name = '';
1052
+ }
1053
+ if ( $this->options['aiosp_opengraph_person_or_org'] == 'person' ) {
1054
+ $social_type = 'Person';
1055
+ } else {
1056
+ $social_type = 'Organization';
1057
+ }
1058
+ }
1059
+ } elseif ( is_singular() && $this->option_isset( 'types' )
1060
+ && is_array( $this->options['aiosp_opengraph_types'] )
1061
+ && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1062
+ ) {
1063
+
1064
+ if ( $type == 'article' ) {
1065
+ if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1066
+ $section = $metabox['aioseop_opengraph_settings_section'];
1067
+ }
1068
+ if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1069
+ $tag = $metabox['aioseop_opengraph_settings_tag'];
1070
+ }
1071
+ if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1072
+ $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1073
+ }
1074
+ }
1075
+
1076
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1077
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1078
+ }
1079
+
1080
+ if ( $type == 'article' && ! empty( $post ) ) {
1081
+ if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1082
+ $author = get_the_author_meta( 'facebook', $post->post_author );
1083
+ }
1084
+
1085
+ if ( isset( $post->post_date_gmt ) ) {
1086
+ $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date_gmt ) );
1087
+ }
1088
+
1089
+ if ( isset( $post->post_modified_gmt ) ) {
1090
+ $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified_gmt ) );
1091
+ }
1092
+ }
1093
+
1094
+ $image = $metabox['aioseop_opengraph_settings_image'];
1095
+ $video = $metabox['aioseop_opengraph_settings_video'];
1096
+ $title = $metabox['aioseop_opengraph_settings_title'];
1097
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1098
+
1099
+ /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1100
+ global $aiosp;
1101
+ if ( empty( $title ) ) {
1102
+ $title = $aiosp->wp_title();
1103
+ }
1104
+ if ( empty( $description ) ) {
1105
+ $description = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
1106
+ }
1107
+
1108
+ /* Add default title */
1109
+ if ( empty( $title ) ) {
1110
+ $title = get_the_title();
1111
+ }
1112
+
1113
+ // Add default description.
1114
+ if ( empty( $description ) && ! post_password_required( $post ) ) {
1115
+
1116
+ $description = $post->post_excerpt;
1117
+
1118
+ if ( $this->options['aiosp_opengraph_generate_descriptions'] || empty( $description ) ) {
1119
+ $description = $post->post_content;
1120
+ }
1121
+ }
1122
+ if ( empty( $type ) ) {
1123
+ $type = 'article';
1124
+ }
1125
+ } elseif ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1126
+ if ( isset( $this->options['aioseop_opengraph_settings_category'] ) ) {
1127
+ $type = $this->options['aioseop_opengraph_settings_category'];
1128
+ }
1129
+ if ( isset( $metabox['aioseop_opengraph_settings_category'] ) ) {
1130
+ $type = $metabox['aioseop_opengraph_settings_category'];
1131
+ }
1132
+ if ( $type == 'article' ) {
1133
+ if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1134
+ $section = $metabox['aioseop_opengraph_settings_section'];
1135
+ }
1136
+ if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1137
+ $tag = $metabox['aioseop_opengraph_settings_tag'];
1138
+ }
1139
+ if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1140
+ $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1141
+ }
1142
+ }
1143
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1144
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1145
+ }
1146
+ if ( $type == 'article' && ! empty( $post ) ) {
1147
+ if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1148
+ $author = get_the_author_meta( 'facebook', $post->post_author );
1149
+ }
1150
+
1151
+ if ( isset( $post->post_date_gmt ) ) {
1152
+ $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date_gmt ) );
1153
+ }
1154
+ if ( isset( $post->post_modified_gmt ) ) {
1155
+ $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified_gmt ) );
1156
+ }
1157
+ }
1158
+ $image = $metabox['aioseop_opengraph_settings_image'];
1159
+ $video = $metabox['aioseop_opengraph_settings_video'];
1160
+ $title = $metabox['aioseop_opengraph_settings_title'];
1161
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1162
+ /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1163
+ global $aiosp;
1164
+ if ( empty( $title ) ) {
1165
+ $title = $aiosp->wp_title();
1166
+ }
1167
+ if ( empty( $description ) ) {
1168
+ $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1169
+ $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1170
+ $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1171
+ }
1172
+ // Add default title
1173
+ if ( empty( $title ) ) {
1174
+ $title = get_the_title();
1175
+ }
1176
+ // Add default description.
1177
+ if ( empty( $description ) && ! post_password_required( $post ) ) {
1178
+ $description = get_queried_object()->description;
1179
+ }
1180
+ if ( empty( $type ) ) {
1181
+ $type = 'website';
1182
+ }
1183
+ } elseif ( is_home() && ! is_front_page() ) {
1184
+ // This is the blog page but not the homepage.
1185
+ global $aiosp;
1186
+ $image = $metabox['aioseop_opengraph_settings_image'];
1187
+ $video = $metabox['aioseop_opengraph_settings_video'];
1188
+ $title = $metabox['aioseop_opengraph_settings_title'];
1189
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1190
+
1191
+ if ( empty( $description ) ) {
1192
+ // If there's not social description, fall back to the SEO description.
1193
+ $description = trim( strip_tags( get_post_meta( get_option( 'page_for_posts' ), '_aioseop_description', true ) ) );
1194
+ }
1195
+ if ( empty( $title ) ) {
1196
+ $title = $aiosp->wp_title();
1197
+ }
1198
+ } else {
1199
+ return;
1200
+ }
1201
+
1202
+ if ( $type === 'article' && ! empty( $post ) && is_singular() ) {
1203
+ if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1204
+ if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1205
+ $keywords = $aiosp->get_main_keywords();
1206
+ $keywords = $this->apply_cf_fields( $keywords );
1207
+ $keywords = apply_filters( 'aioseop_keywords', $keywords );
1208
+ if ( ! empty( $keywords ) && ! empty( $tag ) ) {
1209
+ $tag .= ',' . $keywords;
1210
+ } elseif ( empty( $tag ) ) {
1211
+ $tag = $keywords;
1212
+ }
1213
+ }
1214
+ $tag = $aiosp->keyword_string_to_list( $tag );
1215
+ if ( ! empty( $this->options['aiosp_opengraph_gen_categories'] ) ) {
1216
+ $tag = array_merge( $tag, $aiosp->get_all_categories( $post->ID ) );
1217
+ }
1218
+ if ( ! empty( $this->options['aiosp_opengraph_gen_post_tags'] ) ) {
1219
+ $tag = array_merge( $tag, $aiosp->get_all_tags( $post->ID ) );
1220
+ }
1221
+ }
1222
+ if ( ! empty( $tag ) ) {
1223
+ $tag = $aiosp->clean_keyword_list( $tag );
1224
+ }
1225
+ }
1226
+
1227
+ if ( ! empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
1228
+ $title = do_shortcode( $title );
1229
+ }
1230
+ if ( ! empty( $description ) ) {
1231
+ $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
1232
+ if ( ! empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
1233
+ $description = do_shortcode( $description );
1234
+ }
1235
+ $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );
1236
+ }
1237
+
1238
+ $title = $this->apply_cf_fields( $title );
1239
+ $description = $this->apply_cf_fields( $description );
1240
+
1241
+ /* Data Validation */
1242
+ $title = strip_tags( esc_attr( $title ) );
1243
+ $sitename = strip_tags( esc_attr( $sitename ) );
1244
+ $description = strip_tags( esc_attr( $description ) );
1245
+
1246
+ if ( empty( $thumbnail ) && ! empty( $image ) ) {
1247
+ $thumbnail = $image;
1248
+ }
1249
+
1250
+ // Add user supplied default image.
1251
+ if ( empty( $thumbnail ) ) {
1252
+ if ( empty( $this->options['aiosp_opengraph_defimg'] ) ) {
1253
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1254
+ } else {
1255
+ $img_type = $this->options['aiosp_opengraph_defimg'];
1256
+ if ( ! empty( $post ) ) {
1257
+ // Customize the type of image per post/post_type.
1258
+ $img_type = apply_filters( $this->prefix . 'default_image_type', $img_type, $post, $type );
1259
+ }
1260
+ switch ( $img_type ) {
1261
+ case 'featured':
1262
+ $thumbnail = $this->get_the_image_by_post_thumbnail();
1263
+ break;
1264
+ case 'attach':
1265
+ $thumbnail = $this->get_the_image_by_attachment();
1266
+ break;
1267
+ case 'content':
1268
+ $thumbnail = $this->get_the_image_by_scan();
1269
+ break;
1270
+ case 'custom':
1271
+ $meta_key = $this->options['aiosp_opengraph_meta_key'];
1272
+ if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1273
+ $meta_key = explode( ',', $meta_key );
1274
+ $thumbnail = $this->get_the_image_by_meta_key(
1275
+ array(
1276
+ 'post_id' => $post->ID,
1277
+ 'meta_key' => $meta_key,
1278
+ )
1279
+ );
1280
+ }
1281
+ break;
1282
+ case 'auto':
1283
+ $thumbnail = $this->get_the_image();
1284
+ break;
1285
+ case 'author':
1286
+ $thumbnail = $this->get_the_image_by_author();
1287
+ break;
1288
+ default:
1289
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1290
+ }
1291
+ }
1292
+ }
1293
+
1294
+ if ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) {
1295
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1296
+ if ( ! empty( $post ) ) {
1297
+ // Customize the default image per post/post_type.
1298
+ $thumbnail = apply_filters( $this->prefix . 'default_image', $thumbnail, $post, $type );
1299
+ }
1300
+ }
1301
+
1302
+ if ( ! empty( $thumbnail ) ) {
1303
+ $thumbnail = esc_url( $thumbnail );
1304
+ $thumbnail = set_url_scheme( $thumbnail );
1305
+ }
1306
+
1307
+ $width = $height = '';
1308
+ if ( ! empty( $thumbnail ) ) {
1309
+ if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1310
+ $width = $metabox['aioseop_opengraph_settings_imagewidth'];
1311
+ }
1312
+ if ( ! empty( $metabox['aioseop_opengraph_settings_imageheight'] ) ) {
1313
+ $height = $metabox['aioseop_opengraph_settings_imageheight'];
1314
+ }
1315
+ if ( empty( $width ) && ! empty( $this->options['aiosp_opengraph_dimgwidth'] ) ) {
1316
+ $width = $this->options['aiosp_opengraph_dimgwidth'];
1317
+ }
1318
+ if ( empty( $height ) && ! empty( $this->options['aiosp_opengraph_dimgheight'] ) ) {
1319
+ $height = $this->options['aiosp_opengraph_dimgheight'];
1320
+ }
1321
+ }
1322
+
1323
+ if ( ! empty( $video ) ) {
1324
+ if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1325
+ $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
1326
+ }
1327
+ if ( ! empty( $metabox['aioseop_opengraph_settings_videoheight'] ) ) {
1328
+ $videoheight = $metabox['aioseop_opengraph_settings_videoheight'];
1329
+ }
1330
+ }
1331
+
1332
+ $card = 'summary';
1333
+ if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1334
+ $card = $this->options['aiosp_opengraph_defcard'];
1335
+ }
1336
+
1337
+ if ( ! empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) {
1338
+ $card = $metabox['aioseop_opengraph_settings_setcard'];
1339
+ }
1340
+
1341
+ // support for changing legacy twitter cardtype-photo to summary large image
1342
+ if ( $card == 'photo' ) {
1343
+ $card = 'summary_large_image';
1344
+ }
1345
+
1346
+ $site = $domain = $creator = '';
1347
+
1348
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1349
+ $site = $this->options['aiosp_opengraph_twitter_site'];
1350
+ $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
1351
+ }
1352
+
1353
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1354
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1355
+ }
1356
+
1357
+ if ( ! empty( $post ) && isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) {
1358
+ $creator = get_the_author_meta( 'twitter', $post->post_author );
1359
+ $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1360
+ }
1361
+
1362
+ if ( ! empty( $thumbnail ) ) {
1363
+ $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1364
+ }
1365
+
1366
+ if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1367
+ // Set Twitter image from custom.
1368
+ $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1369
+ }
1370
+
1371
+ // Apply last filters.
1372
+ $description = apply_filters( 'aioseop_description', $description );
1373
+
1374
+ $meta = array(
1375
+ 'facebook' => array(
1376
+ 'title' => 'og:title',
1377
+ 'type' => 'og:type',
1378
+ 'url' => 'og:url',
1379
+ 'thumbnail' => 'og:image',
1380
+ 'width' => 'og:image:width',
1381
+ 'height' => 'og:image:height',
1382
+ 'video' => 'og:video',
1383
+ 'videowidth' => 'og:video:width',
1384
+ 'videoheight' => 'og:video:height',
1385
+ 'sitename' => 'og:site_name',
1386
+ 'key' => 'fb:admins',
1387
+ 'appid' => 'fb:app_id',
1388
+ 'description' => 'og:description',
1389
+ 'section' => 'article:section',
1390
+ 'tag' => 'article:tag',
1391
+ 'publisher' => 'article:publisher',
1392
+ 'author' => 'article:author',
1393
+ 'published_time' => 'article:published_time',
1394
+ 'modified_time' => 'article:modified_time',
1395
+ ),
1396
+ 'twitter' => array(
1397
+ 'card' => 'twitter:card',
1398
+ 'site' => 'twitter:site',
1399
+ 'creator' => 'twitter:creator',
1400
+ 'domain' => 'twitter:domain',
1401
+ 'title' => 'twitter:title',
1402
+ 'description' => 'twitter:description',
1403
+ 'twitter_thumbnail' => 'twitter:image',
1404
+ ),
1405
+ );
1406
+
1407
+ // Only show if "use schema.org markup is checked".
1408
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
1409
+ $meta['google+'] = array( 'thumbnail' => 'image' );
1410
+ }
1411
+
1412
+ $tags = array(
1413
+ 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
1414
+ 'twitter' => array( 'name' => 'name', 'value' => 'content' ),
1415
+ 'google+' => array( 'name' => 'itemprop', 'value' => 'content' ),
1416
+ );
1417
+
1418
+ foreach ( $meta as $t => $data ) {
1419
+ foreach ( $data as $k => $v ) {
1420
+ if ( empty( $$k ) ) {
1421
+ $$k = '';
1422
+ }
1423
+ $filtered_value = $$k;
1424
+ $filtered_value = apply_filters( $this->prefix . 'meta', $filtered_value, $t, $k );
1425
+ if ( ! empty( $filtered_value ) ) {
1426
+ if ( ! is_array( $filtered_value ) ) {
1427
+ $filtered_value = array( $filtered_value );
1428
+ }
1429
+
1430
+ /**
1431
+ * This is to accomodate multiple fb:admins on separate lines.
1432
+ * @TODO Eventually we'll want to put this in its own function so things like images work too.
1433
+ */
1434
+ if ( 'key' === $k ) {
1435
+ $fbadmins = explode( ',', str_replace( ' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1436
+ foreach ( $fbadmins as $fbadmin ) {
1437
+ echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
1438
+ }
1439
+ } else {
1440
+ // For everything else.
1441
+ foreach ( $filtered_value as $f ) {
1442
+ // #1363: use esc_attr( $f ) instead of htmlspecialchars_decode( $f, ENT_QUOTES )
1443
+ echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . esc_attr( $f ) . '" />' . "\n";
1444
+ }
1445
+ }
1446
+ }
1447
+ }
1448
+ }
1449
+ $social_link_schema = '';
1450
+ if ( ! empty( $social_links ) ) {
1451
+ $home_url = esc_url( get_home_url() );
1452
+ $social_links = explode( "\n", $social_links );
1453
+ foreach ( $social_links as $k => $v ) {
1454
+ $v = trim( $v );
1455
+ if ( empty( $v ) ) {
1456
+ unset( $social_links[ $k ] );
1457
+ } else {
1458
+ $v = esc_url( $v );
1459
+ $social_links[ $k ] = $v;
1460
+ }
1461
+ }
1462
+ $social_links = join( '","', $social_links );
1463
+ $social_link_schema = <<<END
1464
+ <script type="application/ld+json">
1465
+ { "@context" : "http://schema.org",
1466
+ "@type" : "{$social_type}",
1467
+ "name" : "{$social_name}",
1468
+ "url" : "{$home_url}",
1469
+ "sameAs" : ["{$social_links}"]
1470
+ }
1471
+ </script>
1472
+
1473
+ END;
1474
+ }
1475
+ echo apply_filters( 'aiosp_opengraph_social_link_schema', $social_link_schema );
1476
+ }
1477
+
1478
+ /**
1479
+ * Do / adds opengraph properties to meta.
1480
+ * @since 2.3.11
1481
+ *
1482
+ * @global array $aioseop_options AIOSEOP plugin options.
1483
+ */
1484
+ public function do_opengraph() {
1485
+ global $aioseop_options;
1486
+ if ( ! empty( $aioseop_options )
1487
+ && ! empty( $aioseop_options['aiosp_schema_markup'] )
1488
+ ) {
1489
+ add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1490
+ }
1491
+ if ( ! defined( 'DOING_AJAX' ) ) {
1492
+ add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1493
+ // Add social meta to AMP plugin.
1494
+ if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true ) {
1495
+ add_action( 'amp_post_template_head', array( &$this, 'add_meta' ), 12 );
1496
+ }
1497
+ }
1498
+ }
1499
+
1500
+ /**
1501
+ * Set up types.
1502
+ *
1503
+ * @since ?
1504
+ * @since 2.3.15 Change to website for homepage and blog post index page, default to object.
1505
+ */
1506
+ function type_setup() {
1507
+ $this->type = 'object'; // Default to type object if we don't have some other rule.
1508
+
1509
+ if ( is_home() || is_front_page() ) {
1510
+ $this->type = 'website'; // Home page and blog page should be website.
1511
+ } elseif ( is_singular() && $this->option_isset( 'types' ) ) {
1512
+ $metabox = $this->get_current_options( array(), 'settings' );
1513
+ $current_post_type = get_post_type();
1514
+ if ( ! empty( $metabox['aioseop_opengraph_settings_category'] ) ) {
1515
+ $this->type = $metabox['aioseop_opengraph_settings_category'];
1516
+ } elseif ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
1517
+ $this->type = $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ];
1518
+ }
1519
+ }
1520
+ }
1521
+
1522
+ /**
1523
+ * Inits hooks and others for admin init.
1524
+ * action:admin_init.
1525
+ *
1526
+ * @since 2.3.11
1527
+ * @since 2.4.14 Refactored function name, and new filter added for defaults and missing term metabox.
1528
+ */
1529
+ function admin_init() {
1530
+ add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1531
+ add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1532
+ add_filter( $this->get_prefix( 'settings' ) . 'default_options', array(
1533
+ &$this,
1534
+ 'filter_default_options',
1535
+ ), 10, 2 );
1536
+ add_filter(
1537
+ $this->get_prefix( 'settings' ) . 'filter_metabox_options', array(
1538
+ &$this,
1539
+ 'filter_metabox_options',
1540
+ ), 10, 3
1541
+ );
1542
+ add_filter(
1543
+ $this->get_prefix( 'settings' ) . 'filter_term_metabox_options', array(
1544
+ &$this,
1545
+ 'filter_metabox_options',
1546
+ ), 10, 3
1547
+ );
1548
+ $post_types = $this->get_post_type_titles();
1549
+ $rempost = array(
1550
+ 'revision' => 1,
1551
+ 'nav_menu_item' => 1,
1552
+ 'custom_css' => 1,
1553
+ 'customize_changeset' => 1,
1554
+ );
1555
+ $post_types = array_diff_key( $post_types, $rempost );
1556
+ $this->default_options['types']['initial_options'] = $post_types;
1557
+ foreach ( $post_types as $slug => $name ) {
1558
+ $field = $slug . '_fb_object_type';
1559
+ $this->default_options[ $field ] = array(
1560
+ 'name' => "$name " . __( 'Object Type', 'all-in-one-seo-pack' ) . "<br />($slug)",
1561
+ 'type' => 'select',
1562
+ 'style' => '',
1563
+ 'initial_options' => $this->fb_object_types,
1564
+ 'default' => 'article',
1565
+ 'condshow' => array( 'aiosp_opengraph_types\[\]' => $slug ),
1566
+ );
1567
+ $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1568
+ $this->help_anchors[ $field ] = '#content-object-types';
1569
+ $this->locations['opengraph']['options'][] = $field;
1570
+ $this->layout['facebook']['options'][] = $field;
1571
+ }
1572
+ $this->setting_options();
1573
+ $this->add_help_text_links();
1574
+
1575
+ }
1576
+
1577
+ function get_all_images( $options = null, $p = null ) {
1578
+ static $img = array();
1579
+ if ( ! is_array( $options ) ) {
1580
+ $options = array();
1581
+ }
1582
+ if ( ! empty( $this->options['aiosp_opengraph_meta_key'] ) ) {
1583
+ $options['meta_key'] = $this->options['aiosp_opengraph_meta_key'];
1584
+ }
1585
+ if ( empty( $img ) ) {
1586
+ $size = apply_filters( 'post_thumbnail_size', 'large' );
1587
+ $default = $this->get_the_image_by_default();
1588
+ if ( ! empty( $default ) ) {
1589
+ $default = set_url_scheme( $default );
1590
+ $img[ $default ] = 0;
1591
+ }
1592
+ $img = array_merge( $img, parent::get_all_images( $options, null ) );
1593
+ }
1594
+
1595
+ if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1596
+ $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1597
+ }
1598
+
1599
+ if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1600
+ $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1601
+ $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1602
+ }
1603
+
1604
+ if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1605
+ $image['author'] = $author_img;
1606
+ }
1607
+ $image = array_flip( $img );
1608
+ $images = array();
1609
+ if ( ! empty( $image ) ) {
1610
+ foreach ( $image as $k => $v ) {
1611
+ $images[ $v ] = '<img height=150 src="' . $v . '">';
1612
+ }
1613
+ }
1614
+
1615
+ return array( $image, $images );
1616
+ }
1617
+
1618
+ function get_the_image_by_author( $options = null, $p = null ) {
1619
+ if ( $p === null ) {
1620
+ global $post;
1621
+ } else {
1622
+ $post = $p;
1623
+ }
1624
+ if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
1625
+ $matches = array();
1626
+ $get_avatar = get_avatar( $post->post_author, 300 );
1627
+ if ( preg_match( "/src='(.*?)'/i", $get_avatar, $matches ) ) {
1628
+ return $matches[1];
1629
+ }
1630
+ }
1631
+
1632
+ return false;
1633
+ }
1634
+
1635
+ function get_the_image( $options = null, $p = null ) {
1636
+ $meta_key = $this->options['aiosp_opengraph_meta_key'];
1637
+
1638
+ return parent::get_the_image( array( 'meta_key' => $meta_key ), $p );
1639
+ }
1640
+
1641
+ function get_the_image_by_default( $args = array() ) {
1642
+ return $this->options['aiosp_opengraph_dimg'];
1643
+ }
1644
+
1645
+ function settings_update() {
1646
+
1647
+ }
1648
+
1649
+ /**
1650
+ * Enqueue our file upload scripts and styles.
1651
+ * @param $hook
1652
+ */
1653
+ function og_admin_enqueue_scripts( $hook ) {
1654
+
1655
+ if ( 'all-in-one-seo_page_aiosp_opengraph' != $hook && 'term.php' != $hook ) {
1656
+ // Only enqueue if we're on the social module settings page.
1657
+ return;
1658
+ }
1659
+
1660
+ wp_enqueue_script( 'media-upload' );
1661
+ wp_enqueue_script( 'thickbox' );
1662
+ wp_enqueue_style( 'thickbox' );
1663
+ wp_enqueue_media();
1664
+ }
1665
+
1666
+ function save_tax_data( $term_id, $tt_id, $taxonomy ) {
1667
+ static $update = false;
1668
+ if ( $update ) {
1669
+ return;
1670
+ }
1671
+ if ( $this->locations !== null ) {
1672
+ foreach ( $this->locations as $k => $v ) {
1673
+ if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
1674
+ $opts = $this->default_options( $k );
1675
+ $options = array();
1676
+ $update = false;
1677
+ foreach ( $opts as $l => $o ) {
1678
+ if ( isset( $_POST[ $l ] ) ) {
1679
+ $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
1680
+ $options[ $l ] = esc_attr( $options[ $l ] );
1681
+ $update = true;
1682
+ }
1683
+ }
1684
+ if ( $update ) {
1685
+ $prefix = $this->get_prefix( $k );
1686
+ $options = apply_filters( $prefix . 'filter_term_metabox_options', $options, $k, $term_id );
1687
+ update_term_meta( $term_id, '_' . $prefix . $k, $options );
1688
+ }
1689
+ }
1690
+ }
1691
+ }
1692
+ }
1693
+
1694
+ /**
1695
+ * Returns the placeholder filtered and ready for DOM display.
1696
+ * filter:aioseop_opengraph_placeholder
1697
+ * @since 2.4.14
1698
+ *
1699
+ * @param mixed $placeholder Placeholder to be filtered.
1700
+ * @param string $type Type of the value to be filtered.
1701
+ *
1702
+ * @return string
1703
+ */
1704
+ public function filter_placeholder( $placeholder, $type = 'text' ) {
1705
+ return strip_tags( trim( $placeholder ) );
1706
+ }
1707
+
1708
+ /**
1709
+ * Returns filtered default options.
1710
+ * filter:{prefix}default_options
1711
+ * @since 2.4.13
1712
+ *
1713
+ * @param array $options Default options.
1714
+ * @param string $location Location.
1715
+ *
1716
+ * @return array
1717
+ */
1718
+ public function filter_default_options( $options, $location ) {
1719
+ if ( $location === 'settings' ) {
1720
+ $prefix = $this->get_prefix( $location ) . $location . '_';
1721
+ // Add image checker as default
1722
+ $options[ $prefix . 'customimg_checker' ] = 0;
1723
+ }
1724
+ return $options;
1725
+ }
1726
+
1727
+ /**
1728
+ * Returns facebook debug script and link.
1729
+ * @since 2.4.14
1730
+ *
1731
+ * @return string
1732
+ */
1733
+ private function get_facebook_debug() {
1734
+ ob_start();
1735
+ ?>
1736
+ <script>
1737
+ jQuery(document).ready(function () {
1738
+ var snippet = jQuery("#aioseop_snippet_link");
1739
+ if (snippet.length === 0) {
1740
+ jQuery("#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
1741
+ } else {
1742
+ snippet = snippet.html();
1743
+ jQuery("#aioseop_opengraph_settings_facebook_debug")
1744
+ .attr("href", "https://developers.facebook.com/tools/debug/sharing/?q=" + snippet);
1745
+ }
1746
+ });
1747
+ </script>
1748
+ <a name="aioseop_opengraph_settings_facebook_debug"
1749
+ id="aioseop_opengraph_settings_facebook_debug"
1750
+ class="button-primary"
1751
+ href=""
1752
+ target="_blank"
1753
+ ><?php echo __( 'Debug This Post', 'all-in-one-seo-pack' ); ?></a>
1754
+ <?php
1755
+ return ob_get_clean();
1756
+ }
1757
+ }
1758
  }
modules/aioseop_robots.php CHANGED
@@ -46,7 +46,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
46
  'type' => array(
47
  'name' => __( 'Rule', 'all-in-one-seo-pack' ),
48
  'type' => 'select',
49
- 'initial_options' => array( 'allow' => __( 'Allow', 'all-in-one-seo-pack' ), 'disallow' => __( 'Block', 'all-in-one-seo-pack' ) ),
50
  'label' => 'top',
51
  'save' => false,
52
  ),
@@ -58,13 +58,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
58
  ),
59
  'Submit' => array(
60
  'type' => 'submit',
61
- 'class' => 'button-primary',
62
  'name' => __( 'Add Rule', 'all-in-one-seo-pack' ) . ' &raquo;',
63
  'style' => 'margin-left: 20px;',
64
  'label' => 'none',
65
  'save' => false,
66
  'value' => 1,
67
  ),
 
 
 
 
 
 
68
  'rules' => array(
69
  'name' => __( 'Configured Rules', 'all-in-one-seo-pack' ),
70
  'type' => 'custom',
@@ -329,22 +335,28 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
329
  aioseop_ajax_init();
330
  $id = $_POST['options'];
331
 
 
 
 
 
332
  global $aioseop_options;
333
 
 
334
  // first check the defined rules.
335
  $blog_rules = $this->get_all_rules();
336
  $rules = array();
337
  foreach ( $blog_rules as $rule ) {
338
  if ( $id === $rule['id'] ) {
 
339
  continue;
340
  }
341
  $rules[] = $rule;
342
  }
343
  $aioseop_options['modules']["{$this->prefix}options"]["{$this->prefix}rules"] = $rules;
344
  update_option( 'aioseop_options', $aioseop_options );
 
345
  }
346
 
347
-
348
  private function add_error( $error ) {
349
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
350
  if ( false === $errors ) {
@@ -362,8 +374,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
362
  *
363
  * @return mixed
364
  */
365
- function filter_options( $options ) {
 
 
 
 
 
 
 
366
  $blog_rules = $this->get_all_rules();
 
367
  if ( ! empty( $_POST[ "{$this->prefix}path" ] ) ) {
368
  foreach ( array_keys( $this->rule_fields ) as $field ) {
369
  $post_field = $this->prefix . "" . $field;
@@ -381,6 +401,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
381
  $rule = $this->validate_rule( $blog_rules, $new_rule );
382
  if ( is_wp_error( $rule ) ) {
383
  $this->add_error( $rule );
 
 
 
384
  } else {
385
  $blog_rules[] = $rule;
386
  }
@@ -507,10 +530,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
507
  $buf = '';
508
  if ( ! empty( $rules ) ) {
509
  $rules = $this->reorder_rules( $rules );
510
- $buf = "<table class='aioseop_table' cellpadding=0 cellspacing=0>\n";
511
- $row = "\t<tr><td><a href='#' class='aiosp_delete aiosp_robots_delete_rule' data-id='%s'></a></td><td>%s</td><td>%s</td><td>%s</td></tr>\n";
 
 
 
 
 
 
 
 
 
512
  foreach ( $rules as $v ) {
513
- $buf .= sprintf( $row, $v['id'], $v['agent'], $v['type'], $v['path'] );
514
  }
515
  $buf .= "</table>\n";
516
  }
46
  'type' => array(
47
  'name' => __( 'Rule', 'all-in-one-seo-pack' ),
48
  'type' => 'select',
49
+ 'initial_options' => array( 'allow' => __( 'Allow', 'all-in-one-seo-pack' ), 'disallow' => __( 'Disallow', 'all-in-one-seo-pack' ) ),
50
  'label' => 'top',
51
  'save' => false,
52
  ),
58
  ),
59
  'Submit' => array(
60
  'type' => 'submit',
61
+ 'class' => 'button-primary add-edit-rule',
62
  'name' => __( 'Add Rule', 'all-in-one-seo-pack' ) . ' &raquo;',
63
  'style' => 'margin-left: 20px;',
64
  'label' => 'none',
65
  'save' => false,
66
  'value' => 1,
67
  ),
68
+ "{$this->prefix}id" => array(
69
+ 'type' => 'hidden',
70
+ 'class' => 'edit-rule-id',
71
+ 'save' => false,
72
+ 'value' => '',
73
+ ),
74
  'rules' => array(
75
  'name' => __( 'Configured Rules', 'all-in-one-seo-pack' ),
76
  'type' => 'custom',
335
  aioseop_ajax_init();
336
  $id = $_POST['options'];
337
 
338
+ $this->delete_rule( $id );
339
+ }
340
+
341
+ private function delete_rule( $id ) {
342
  global $aioseop_options;
343
 
344
+ $deleted_rule = null;
345
  // first check the defined rules.
346
  $blog_rules = $this->get_all_rules();
347
  $rules = array();
348
  foreach ( $blog_rules as $rule ) {
349
  if ( $id === $rule['id'] ) {
350
+ $deleted_rule = $rule;
351
  continue;
352
  }
353
  $rules[] = $rule;
354
  }
355
  $aioseop_options['modules']["{$this->prefix}options"]["{$this->prefix}rules"] = $rules;
356
  update_option( 'aioseop_options', $aioseop_options );
357
+ return $deleted_rule;
358
  }
359
 
 
360
  private function add_error( $error ) {
361
  $errors = get_transient( "{$this->prefix}errors" . get_current_user_id() );
362
  if ( false === $errors ) {
374
  *
375
  * @return mixed
376
  */
377
+ function filter_options( $options ) {
378
+ $modify = isset( $_POST[ "{$this->prefix}id" ] ) && ! empty( $_POST[ "{$this->prefix}id" ] );
379
+ $deleted_rule = null;
380
+ if ( $modify ) {
381
+ // let's first delete the original rule and save it temporarily so that we can add it back in case of an error with the new rule.
382
+ $deleted_rule = $this->delete_rule( $_POST[ "{$this->prefix}id" ] );
383
+ }
384
+
385
  $blog_rules = $this->get_all_rules();
386
+
387
  if ( ! empty( $_POST[ "{$this->prefix}path" ] ) ) {
388
  foreach ( array_keys( $this->rule_fields ) as $field ) {
389
  $post_field = $this->prefix . "" . $field;
401
  $rule = $this->validate_rule( $blog_rules, $new_rule );
402
  if ( is_wp_error( $rule ) ) {
403
  $this->add_error( $rule );
404
+ if ( $deleted_rule ) {
405
+ $blog_rules[] = $deleted_rule;
406
+ }
407
  } else {
408
  $blog_rules[] = $rule;
409
  }
530
  $buf = '';
531
  if ( ! empty( $rules ) ) {
532
  $rules = $this->reorder_rules( $rules );
533
+ $buf = sprintf( "<table class='aioseop_table' cellpadding=0 cellspacing=0 data-edit-label='%s'>\n", __( 'Modify Rule', 'all-in-one-seo-pack' ) . ' &raquo;' );
534
+ $row = "\t
535
+ <tr>
536
+ <td>
537
+ <a href='#' class='dashicons dashicons-trash aiosp_robots_delete_rule' data-id='%s'></a>
538
+ <a href='#' class='dashicons dashicons-edit aiosp_robots_edit_rule' data-id='%s' data-agent='%s' data-type='%s' data-path='%s'></a>
539
+ </td>
540
+ <td>%s</td>
541
+ <td>%s</td>
542
+ <td>%s</td>
543
+ </tr>\n";
544
  foreach ( $rules as $v ) {
545
+ $buf .= sprintf( $row, $v['id'], $v['id'], esc_attr( $v['agent'] ), esc_attr( strtolower( $v['type'] ) ), esc_attr( $v['path'] ), $v['agent'], $v['type'], $v['path'] );
546
  }
547
  $buf .= "</table>\n";
548
  }
modules/aioseop_sitemap.php CHANGED
@@ -27,18 +27,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
27
  var $extra_sitemaps;
28
  var $excludes = array();
29
 
30
- /**
31
- * The allowed image extensions.
32
- *
33
- * @var array $image_extensions The allowed image extensions.
34
- */
35
- private static $image_extensions = array(
36
- 'jpg',
37
- 'jpeg',
38
- 'png',
39
- 'gif',
40
- );
41
-
42
  /**
43
  * All_in_One_SEO_Pack_Sitemap constructor.
44
  */
@@ -690,7 +678,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
690
  } else if ( 'aiosp_video_sitemap_' === $this->prefix ) {
691
  $filename = 'video-sitemap';
692
  }
693
- return $filename;
 
 
 
 
 
694
  }
695
 
696
  /**
@@ -713,9 +706,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
713
  $options[ $this->prefix . 'max_posts' ] = 50000;
714
  }
715
  $url = aioseop_home_url( '/' . $this->get_filename() . '.xml' );
 
716
 
717
- $options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your sitemap', 'all-in-one-seo-pack' ) . '</a>' );
718
  $options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created with content and images.', 'all-in-one-seo-pack' );
 
719
  if ( '0' !== get_option( 'blog_public' ) ) {
720
  $options[ $this->prefix . 'link' ] .= ' ' . __( 'Changes are automatically submitted to search engines.', 'all-in-one-seo-pack' );
721
  }
@@ -1166,9 +1161,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1166
  function get_rewrite_rules() {
1167
  $sitemap_rules_normal = $sitemap_rules_gzipped = array();
1168
  $sitemap_rules_normal = array(
 
1169
  $this->get_filename() . '.xml' => "index.php?{$this->prefix}path=root",
1170
  $this->get_filename() . '_(.+)_(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1171
  $this->get_filename() . '_(.+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
 
 
1172
  );
1173
  if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1174
  $sitemap_rules_gzipped = array(
@@ -1207,10 +1205,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1207
  $sitemap_rules = $this->get_rewrite_rules( $wp_rewrite );
1208
  if ( ! empty( $sitemap_rules ) ) {
1209
  $rules = get_option( 'rewrite_rules' );
1210
- $rule = key( $sitemap_rules );
1211
- if ( ! isset( $rules[ $rule ] ) || ( $rules[ $rule ] !== $sitemap_rules[ $rule ] ) ) {
1212
- $wp_rewrite->flush_rules();
1213
- set_transient( "{$this->prefix}rules_flushed", true, 43200 );
 
 
1214
  }
1215
  }
1216
  }
@@ -1332,8 +1332,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1332
  */
1333
  function get_sitemap_data( $sitemap_type, $page = 0 ) {
1334
  $sitemap_data = array();
1335
- if ( $this->options[ "{$this->prefix}indexes" ] ) {
1336
- $posttypes = $this->options[ "{$this->prefix}posttypes" ];
 
 
 
1337
  if ( empty( $posttypes ) ) {
1338
  $posttypes = array();
1339
  }
@@ -1474,8 +1477,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1474
 
1475
  $comment = sprintf( "file '%s' statically", $this->get_filename() );
1476
  $sitemap = $this->do_simple_sitemap( $comment );
 
1477
  $this->write_sitemaps( $this->get_filename(), $sitemap );
1478
- $this->log_stats( 'root', $this->options["{$this->prefix}gzipped"], false );
 
 
1479
  }
1480
  } else {
1481
  delete_transient( "{$this->prefix}rules_flushed" );
@@ -1509,10 +1515,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1509
  * @param $filename
1510
  * @param $contents
1511
  */
1512
- function write_sitemaps( $filename, $contents ) {
1513
- $this->write_sitemap( $filename . '.xml', $contents );
1514
- if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1515
- $this->write_sitemap( $filename . '.xml.gz', $contents, true );
1516
  }
1517
  }
1518
 
@@ -1776,10 +1782,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1776
  */
1777
  function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1778
  if ( empty( $filename ) ) {
1779
- if ( 'root' === $sitemap_type ) {
1780
- $filename = $this->get_filename();
1781
- } else {
1782
- $filename = $this->get_filename() . '_' . $sitemap_type;
 
 
 
 
 
 
 
1783
  }
1784
  }
1785
  if ( empty( $comment ) ) {
@@ -1789,7 +1802,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1789
  if ( ( 'root' === $sitemap_type ) && ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1790
  return $this->build_sitemap_index( $sitemap_data, sprintf( $comment, $filename ) );
1791
  } else {
1792
- return $this->build_sitemap( $sitemap_data, sprintf( $comment, $filename ) );
1793
  }
1794
  }
1795
 
@@ -2008,7 +2021,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2008
  $sitemap_data = $this->get_simple_sitemap();
2009
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'root', 0, $this->options );
2010
 
2011
- return $this->build_sitemap( $sitemap_data, $comment );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2012
  }
2013
 
2014
  /**
@@ -2027,15 +2054,83 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2027
  return esc_url( apply_filters( 'aioseop_sitemap_xsl_url', aioseop_home_url( '/sitemap.xsl' ) ) );
2028
  }
2029
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2030
  /**
2031
  * Output the XML for a sitemap.
2032
  *
2033
  * @param $urls
 
2034
  * @param string $comment
2035
  *
2036
  * @return null
2037
  */
2038
- function output_sitemap( $urls, $comment = '' ) {
 
 
 
 
 
 
2039
  $max_items = 50000;
2040
  if ( ! is_array( $urls ) ) {
2041
  return null;
@@ -2080,6 +2175,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2080
  foreach ( $urls as $url ) {
2081
  echo "\t<url>\r\n";
2082
  if ( is_array( $url ) ) {
 
 
 
2083
  foreach ( $url as $k => $v ) {
2084
  if ( ! empty( $v ) ) {
2085
  if ( 'loc' === $k ) {
@@ -2186,13 +2284,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2186
  * Return an XML sitemap as a string.
2187
  *
2188
  * @param $urls
 
2189
  * @param string $comment
2190
  *
2191
  * @return string
2192
  */
2193
- function build_sitemap( $urls, $comment = '' ) {
2194
  ob_start();
2195
- $this->output_sitemap( $urls, $comment );
2196
 
2197
  return ob_get_clean();
2198
  }
@@ -2224,6 +2323,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2224
  }
2225
 
2226
  $pr_info['image:image'] = $this->get_images_from_term( $term );
 
 
 
 
 
2227
  $prio[] = $pr_info;
2228
  }
2229
  }
@@ -2231,6 +2335,37 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2231
  return $prio;
2232
  }
2233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2234
  /**
2235
  * Return a list of permalinks for an array of terms.
2236
  *
@@ -2545,11 +2680,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2545
  }
2546
 
2547
  if ( ! empty( $archives ) ) {
2548
- return $this->get_prio_from_posts(
2549
- $archives, $this->get_default_priority( 'archive', true ), $this->get_default_frequency( 'archive', true ), array(
2550
  $this,
2551
  'get_date_archive_link_from_post',
2552
- )
 
2553
  );
2554
  }
2555
 
@@ -2651,11 +2787,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2651
  }
2652
  }
2653
 
2654
- return $this->get_prio_from_posts(
2655
- $authors, $this->get_default_priority( 'author', true ), $this->get_default_frequency( 'author', true ), array(
2656
  $this,
2657
  'get_author_link_from_post',
2658
- )
 
2659
  );
2660
  }
2661
 
@@ -2714,10 +2851,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2714
  * @param bool $prio_override
2715
  * @param bool $freq_override
2716
  * @param string $linkfunc
 
2717
  *
2718
  * @return array
2719
  */
2720
- private function get_prio_from_posts( $posts, $prio_override = false, $freq_override = false, $linkfunc = 'get_permalink' ) {
2721
  $prio = array();
2722
  $args = array(
2723
  'prio_override' => $prio_override,
@@ -2730,10 +2868,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2730
  $stats = $this->get_comment_count_stats( $posts );
2731
  }
2732
  if ( is_array( $posts ) ) {
2733
- foreach ( $posts as $post ) {
2734
  // Determine if we check the post for images.
2735
  $is_single = true;
2736
  $post->filter = 'sample';
 
2737
  if ( 'get_permalink' === $linkfunc ) {
2738
  $url = $this->get_permalink( $post );
2739
  } else {
@@ -2751,6 +2890,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2751
  $date = $post->post_date_gmt;
2752
  }
2753
  if ( '0000-00-00 00:00:00' !== $date ) {
 
2754
  $date = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $date ) );
2755
  } else {
2756
  $date = 0;
@@ -2790,6 +2930,31 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2790
  if ( is_float( $pr_info['priority'] ) ) {
2791
  $pr_info['priority'] = sprintf( '%0.1F', $pr_info['priority'] );
2792
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2793
  $pr_info['image:image'] = $is_single ? $this->get_images_from_post( $post ) : null;
2794
  $pr_info = apply_filters( $this->prefix . 'prio_item_filter', $pr_info, $post, $args );
2795
  if ( ! empty( $pr_info ) ) {
@@ -2801,6 +2966,30 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2801
  return $prio;
2802
  }
2803
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2804
  /**
2805
  * Return the images attached to the term.
2806
  *
@@ -2824,6 +3013,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2824
  if ( $thumbnail_id ) {
2825
  $image = wp_get_attachment_url( $thumbnail_id );
2826
  if ( $image ) {
 
2827
  $images['image:image'] = array(
2828
  'image:loc' => $image,
2829
  );
@@ -2864,10 +3054,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2864
  // Ignore all attachments except images.
2865
  return null;
2866
  }
2867
- $attributes = wp_get_attachment_image_src( $post->ID );
2868
  if ( $attributes ) {
2869
  $images[] = array(
2870
- 'image:loc' => $this->clean_url( $attributes[0] ),
 
 
2871
  );
2872
  }
2873
 
@@ -2893,7 +3085,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2893
  }
2894
 
2895
  if ( isset( $post_thumbnails[ $post->ID ] ) ) {
2896
- $attachment_url = wp_get_attachment_image_url( $post_thumbnails[ $post->ID ], 'post-thumbnail' );
2897
  if ( $attachment_url ) {
2898
  $images[] = $attachment_url;
2899
  }
@@ -2902,10 +3094,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2902
  $content = '';
2903
  $content = $post->post_content;
2904
 
2905
- $this->get_gallery_images( $post, $images );
2906
-
2907
- $content .= $this->get_content_from_galleries( $content );
2908
- $this->parse_content_for_images( $content, $images );
2909
 
2910
  if ( $images ) {
2911
  $tmp = $images;
@@ -2914,11 +3103,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2914
  $tmp = array_unique( $images );
2915
  }
2916
  // remove any invalid/empty images.
2917
- $tmp = array_filter( $images, array( $this, 'is_image_valid' ) );
2918
  $images = array();
2919
  foreach ( $tmp as $image ) {
2920
- $images[] = array(
2921
- 'image:loc' => $this->clean_url( $image ),
 
 
 
 
 
2922
  );
2923
  }
2924
  }
@@ -2926,127 +3120,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2926
  return $images;
2927
  }
2928
 
2929
- /**
2930
- * Fetch images from WP, Jetpack and WooCommerce galleries.
2931
- *
2932
- * @param string $post The post.
2933
- * @param array $images the array of images.
2934
- *
2935
- * @since 2.4.2
2936
- */
2937
- private function get_gallery_images( $post, &$images ) {
2938
- if ( false === apply_filters( 'aioseo_include_images_in_wp_gallery', true ) ) {
2939
- return;
2940
- }
2941
-
2942
- // Check images galleries in the content. DO NOT run the_content filter here as it might cause issues with other shortcodes.
2943
- if ( has_shortcode( $post->post_content, 'gallery' ) ) {
2944
- // Get the jetpack gallery images.
2945
- if ( class_exists( 'Jetpack_PostImages' ) ) {
2946
- $jetpack = Jetpack_PostImages::get_images( $post->ID );
2947
- if ( $jetpack ) {
2948
- foreach ( $jetpack as $jetpack_image ) {
2949
- $images[] = $jetpack_image['src'];
2950
- }
2951
- }
2952
- }
2953
-
2954
- // Get the default WP gallery images.
2955
- $galleries = get_post_galleries( $post, false );
2956
- if ( $galleries ) {
2957
- foreach ( $galleries as $gallery ) {
2958
- $images = array_merge( $images, $gallery['src'] );
2959
- }
2960
- }
2961
- }
2962
-
2963
- // Check WooCommerce product gallery.
2964
- if ( class_exists( 'WooCommerce' ) ) {
2965
- $woo_images = get_post_meta( $post->ID, '_product_image_gallery', true );
2966
- if ( ! empty( $woo_images ) ) {
2967
- $woo_images = array_filter( explode( ',', $woo_images ) );
2968
- if ( is_array( $woo_images ) ) {
2969
- foreach ( $woo_images as $id ) {
2970
- $images[] = wp_get_attachment_url( $id );
2971
- }
2972
- }
2973
- }
2974
- }
2975
-
2976
- $images = array_unique( $images );
2977
- }
2978
-
2979
- /**
2980
- * Parses the content to find out if specified images galleries exist and if they do, parse them for images.
2981
- * Supports NextGen.
2982
- *
2983
- * @param string $content The post content.
2984
- *
2985
- * @since 2.4.2
2986
- *
2987
- * @return string
2988
- */
2989
- private function get_content_from_galleries( $content ) {
2990
- // Support for NextGen Gallery.
2991
- static $gallery_types = array( 'ngg_images' );
2992
- $types = apply_filters( 'aioseop_gallery_shortcodes', $gallery_types );
2993
-
2994
- $gallery_content = '';
2995
-
2996
- if ( ! $types ) {
2997
- return $gallery_content;
2998
- }
2999
-
3000
- $found = array();
3001
- if ( $types ) {
3002
- foreach ( $types as $type ) {
3003
- if ( has_shortcode( $content, $type ) ) {
3004
- $found[] = $type;
3005
- }
3006
- }
3007
- }
3008
-
3009
- // If none of the shortcodes-of-interest are found, bail.
3010
- if ( empty( $found ) ) {
3011
- return $gallery_content;
3012
- }
3013
-
3014
- $galleries = array();
3015
-
3016
- if ( ! preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER ) ) {
3017
- return $gallery_content;
3018
- }
3019
-
3020
- // Collect the shortcodes and their attributes.
3021
- foreach ( $found as $type ) {
3022
- foreach ( $matches as $shortcode ) {
3023
- if ( $type === $shortcode[2] ) {
3024
-
3025
- $attributes = shortcode_parse_atts( $shortcode[3] );
3026
-
3027
- if ( '' === $attributes ) { // Valid shortcode without any attributes.
3028
- $attributes = array();
3029
- }
3030
-
3031
- $galleries[ $shortcode[2] ] = $attributes;
3032
- }
3033
- }
3034
- }
3035
-
3036
- // Recreate the shortcodes and then render them to get the HTML content.
3037
- if ( $galleries ) {
3038
- foreach ( $galleries as $shortcode => $attributes ) {
3039
- $code = '[' . $shortcode;
3040
- foreach ( $attributes as $key => $value ) {
3041
- $code .= " $key=$value";
3042
- }
3043
- $code .= ']';
3044
- $gallery_content .= do_shortcode( $code );
3045
- }
3046
- }
3047
-
3048
- return $gallery_content;
3049
- }
3050
 
3051
  /**
3052
  * Cleans the URL so that its acceptable in the sitemap.
@@ -3067,112 +3140,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3067
  return apply_filters( 'aioseop_clean_url', $url );
3068
  }
3069
 
3070
- /**
3071
- * Validate the image.
3072
- * NOTE: We will use parse_url here instead of wp_parse_url as we will correct the URLs beforehand and
3073
- * this saves us the need to check PHP version support.
3074
- *
3075
- * @param string $image The image src.
3076
- *
3077
- * @since 2.4.1
3078
- * @since 2.4.3 Compatibility with Pre v4.7 wp_parse_url().
3079
- *
3080
- * @return bool
3081
- */
3082
- function is_image_valid( $image ) {
3083
- global $wp_version;
3084
-
3085
- // Bail if empty image.
3086
- if ( empty( $image ) ) {
3087
- return false;
3088
- }
3089
-
3090
- global $wp_version;
3091
- if ( version_compare( $wp_version, '4.4', '<' ) ) {
3092
- $p_url = parse_url( $image );
3093
- $url = $p_url['scheme'] . $p_url['host'] . $p_url['path'];
3094
- } elseif ( version_compare( $wp_version, '4.7', '<' ) ) {
3095
- // Compatability for older WP version that don't have 4.7 changes.
3096
- // @link https://core.trac.wordpress.org/changeset/38726
3097
- $p_url = wp_parse_url( $image );
3098
- $url = $p_url['scheme'] . $p_url['host'] . $p_url['path'];
3099
- } else {
3100
- $component = PHP_URL_PATH;
3101
- $url = wp_parse_url( $image, $component );
3102
- }
3103
-
3104
- // make the url absolute, if its relative.
3105
- $image = aiosp_common::absolutize_url( $image );
3106
-
3107
- $extn = pathinfo( parse_url( $image, PHP_URL_PATH ), PATHINFO_EXTENSION );
3108
- $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
3109
- // Bail if image does not refer to an image file otherwise google webmaster tools might reject the sitemap.
3110
- if ( ! in_array( $extn, $allowed, true ) ) {
3111
- return false;
3112
- }
3113
-
3114
- $image_host = parse_url( $image, PHP_URL_HOST );
3115
- $host = parse_url( home_url(), PHP_URL_HOST );
3116
-
3117
- if ( $image_host !== $host ) {
3118
- // Allowed hosts will be provided in a wildcard format i.e. img.yahoo.* or *.akamai.*.
3119
- // And we will convert that into a regular expression for matching.
3120
- $whitelist = apply_filters( 'aioseop_images_allowed_from_hosts', array() );
3121
- $allowed = false;
3122
- if ( $whitelist ) {
3123
- foreach ( $whitelist as $pattern ) {
3124
- if ( preg_match( '/' . str_replace( '*', '.*', $pattern ) . '/', $image_host ) === 1 ) {
3125
- $allowed = true;
3126
- break;
3127
- }
3128
- }
3129
- }
3130
- return $allowed;
3131
-
3132
- }
3133
- return true;
3134
- }
3135
-
3136
- /**
3137
- * Parse the post for images.
3138
- *
3139
- * @param string $content the post content.
3140
- * @param array $images the array of images.
3141
- */
3142
- function parse_content_for_images( $content, &$images ) {
3143
- // These tags should be WITHOUT trailing space because some plugins such as the nextgen gallery put newlines immediately after <img.
3144
- $total = substr_count( $content, '<img' ) + substr_count( $content, '<IMG' );
3145
- // no images found.
3146
- if ( 0 === $total ) {
3147
- return;
3148
- }
3149
-
3150
- if ( class_exists( 'DOMDocument' ) ) {
3151
- $dom = new domDocument();
3152
- // Non-compliant HTML might give errors, so ignore them.
3153
- libxml_use_internal_errors( true );
3154
- $dom->loadHTML( $content );
3155
- libxml_clear_errors();
3156
- $dom->preserveWhiteSpace = false;
3157
- $matches = $dom->getElementsByTagName( 'img' );
3158
- foreach ( $matches as $match ) {
3159
- $images[] = $match->getAttribute( 'src' );
3160
- }
3161
- } else {
3162
- // Fall back to regex, but also report an error.
3163
- global $img_err_msg;
3164
- if ( ! isset( $img_err_msg ) ) {
3165
- // we will log this error message only once, not per post.
3166
- $img_err_msg = true;
3167
- $this->debug_message( 'DOMDocument not found; using REGEX' );
3168
- }
3169
- preg_match_all( '/<img.*src=([\'"])?(.*?)\\1/', $content, $matches );
3170
- if ( $matches && isset( $matches[2] ) ) {
3171
- $images = array_merge( $images, $matches[2] );
3172
- }
3173
- }
3174
- }
3175
-
3176
  /**
3177
  * Return excluded categories for taxonomy queries.
3178
  *
@@ -3188,9 +3155,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3188
  if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
3189
  $args['number'] = $this->max_posts;
3190
  $args['offset'] = $page * $this->max_posts;
3191
-
3192
  }
3193
 
 
 
3194
  return $args;
3195
  }
3196
 
@@ -3580,5 +3548,4 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3580
  return $posts;
3581
  }
3582
  }
3583
- }
3584
-
27
  var $extra_sitemaps;
28
  var $excludes = array();
29
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * All_in_One_SEO_Pack_Sitemap constructor.
32
  */
678
  } else if ( 'aiosp_video_sitemap_' === $this->prefix ) {
679
  $filename = 'video-sitemap';
680
  }
681
+ /**
682
+ * Filters the filename: aiosp_sitemap_filename OR aiosp_video_sitemap_filename.
683
+ *
684
+ * @param string $filename The file name.
685
+ */
686
+ return apply_filters( "{$this->prefix}filename", $filename );
687
  }
688
 
689
  /**
706
  $options[ $this->prefix . 'max_posts' ] = 50000;
707
  }
708
  $url = aioseop_home_url( '/' . $this->get_filename() . '.xml' );
709
+ $url_rss = aioseop_home_url( '/' . $this->get_filename() . '.rss' );
710
 
711
+ $options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your XML sitemap', 'all-in-one-seo-pack' ) . '</a>' );
712
  $options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created with content and images.', 'all-in-one-seo-pack' );
713
+ $options[ $this->prefix . 'link' ] .= '<p>' . sprintf( __( 'Click here to %1$sview your RSS sitemap%2$s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url_rss ) . '" target="_blank">', '</a>' ) . '</p>';
714
  if ( '0' !== get_option( 'blog_public' ) ) {
715
  $options[ $this->prefix . 'link' ] .= ' ' . __( 'Changes are automatically submitted to search engines.', 'all-in-one-seo-pack' );
716
  }
1161
  function get_rewrite_rules() {
1162
  $sitemap_rules_normal = $sitemap_rules_gzipped = array();
1163
  $sitemap_rules_normal = array(
1164
+
1165
  $this->get_filename() . '.xml' => "index.php?{$this->prefix}path=root",
1166
  $this->get_filename() . '_(.+)_(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1167
  $this->get_filename() . '_(.+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
1168
+ $this->get_filename() . '.rss' => 'index.php?' . $this->prefix . 'path=rss',
1169
+ $this->get_filename() . 'latest.rss' => 'index.php?' . $this->prefix . 'path=rss_latest',
1170
  );
1171
  if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1172
  $sitemap_rules_gzipped = array(
1205
  $sitemap_rules = $this->get_rewrite_rules( $wp_rewrite );
1206
  if ( ! empty( $sitemap_rules ) ) {
1207
  $rules = get_option( 'rewrite_rules' );
1208
+ $new_rules = array_keys( $sitemap_rules );
1209
+ foreach ( $new_rules as $rule ) {
1210
+ if ( ! isset( $rules[ $rule ] ) || ( $rules[ $rule ] !== $sitemap_rules[ $rule ] ) ) {
1211
+ $wp_rewrite->flush_rules();
1212
+ set_transient( "{$this->prefix}rules_flushed", true, 43200 );
1213
+ }
1214
  }
1215
  }
1216
  }
1332
  */
1333
  function get_sitemap_data( $sitemap_type, $page = 0 ) {
1334
  $sitemap_data = array();
1335
+
1336
+ if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
1337
+ $sitemap_data = $this->get_simple_sitemap();
1338
+ } elseif ( $this->options[ "{$this->prefix}indexes" ] ) {
1339
+ $posttypes = $this->options["{$this->prefix}posttypes"];
1340
  if ( empty( $posttypes ) ) {
1341
  $posttypes = array();
1342
  }
1477
 
1478
  $comment = sprintf( "file '%s' statically", $this->get_filename() );
1479
  $sitemap = $this->do_simple_sitemap( $comment );
1480
+
1481
  $this->write_sitemaps( $this->get_filename(), $sitemap );
1482
+ $rss = $this->do_simple_sitemap_rss( $comment );
1483
+ $this->write_sitemaps( $this->get_filename(), $rss, '.rss' );
1484
+ $this->log_stats( 'root', $this->options[ "{$this->prefix}gzipped" ], false );
1485
  }
1486
  } else {
1487
  delete_transient( "{$this->prefix}rules_flushed" );
1515
  * @param $filename
1516
  * @param $contents
1517
  */
1518
+ function write_sitemaps( $filename, $contents, $extn = '.xml' ) {
1519
+ $this->write_sitemap( $filename . $extn, $contents );
1520
+ if ( $this->options["{$this->prefix}gzipped"] ) {
1521
+ $this->write_sitemap( $filename . $extn . '.gz', $contents, true );
1522
  }
1523
  }
1524
 
1782
  */
1783
  function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1784
  if ( empty( $filename ) ) {
1785
+ switch ( $sitemap_type ) {
1786
+ case 'root':
1787
+ // fall-through.
1788
+ case 'rss':
1789
+ // fall-through.
1790
+ case 'rss_latest':
1791
+ $filename = $this->get_filename();
1792
+ break;
1793
+ default:
1794
+ $filename = $this->get_filename() . '_' . $sitemap_type;
1795
+ break;
1796
  }
1797
  }
1798
  if ( empty( $comment ) ) {
1802
  if ( ( 'root' === $sitemap_type ) && ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1803
  return $this->build_sitemap_index( $sitemap_data, sprintf( $comment, $filename ) );
1804
  } else {
1805
+ return $this->build_sitemap( $sitemap_data, $sitemap_type, sprintf( $comment, $filename ) );
1806
  }
1807
  }
1808
 
2021
  $sitemap_data = $this->get_simple_sitemap();
2022
  $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'root', 0, $this->options );
2023
 
2024
+ return $this->build_sitemap( $sitemap_data, '', $comment );
2025
+ }
2026
+
2027
+ /**
2028
+ * Build a single stand-alone RSS sitemap without indexes.
2029
+ *
2030
+ * @param string $comment
2031
+ *
2032
+ * @return string
2033
+ */
2034
+ function do_simple_sitemap_rss( $comment = '' ) {
2035
+ $sitemap_data = $this->get_simple_sitemap();
2036
+ $sitemap_data = apply_filters( $this->prefix . 'data', $sitemap_data, 'rss', 0, $this->options );
2037
+
2038
+ return $this->build_sitemap( $sitemap_data, 'rss', $comment );
2039
  }
2040
 
2041
  /**
2054
  return esc_url( apply_filters( 'aioseop_sitemap_xsl_url', aioseop_home_url( '/sitemap.xsl' ) ) );
2055
  }
2056
 
2057
+ /**
2058
+ * Output the RSS for a sitemap, full or latest.
2059
+ *
2060
+ * @param $urls
2061
+ * @param string $sitemap_type The type of RSS sitemap viz. rss or rss_latest.
2062
+ * @param string $comment
2063
+ */
2064
+ private function output_rss( $urls, $sitemap_type, $comment ) {
2065
+ echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n\r\n";
2066
+ echo '<!-- ' . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date( 'D, d M Y H:i:s e' ) ) . " -->\r\n";
2067
+
2068
+ echo '<rss version="2.0"><channel>';
2069
+ if ( is_multisite() ) {
2070
+ echo '<title>' . esc_html( get_blog_option( get_current_blog_id(), 'blogname' ) ) . '</title>
2071
+ <link>' . esc_url( get_blog_option( get_current_blog_id(), 'siteurl' ) ) . '</link>
2072
+ <description>' . esc_html( get_blog_option( get_current_blog_id(), 'blogdescription' ) ) . '</description>';
2073
+ } else {
2074
+ echo '<title>' . esc_html( get_option( 'blogname' ) ) . '</title>
2075
+ <link>' . esc_url( get_option( 'siteurl' ) ) . '</link>
2076
+ <description>' . esc_html( get_option( 'blogdescription' ) ) . '</description>';
2077
+ }
2078
+
2079
+ // remove urls that do not have the rss element.
2080
+ $urls = array_filter( $urls, array( $this, 'include_in_rss' ) );
2081
+
2082
+ if ( false !== strpos( $sitemap_type, 'latest' ) ) {
2083
+ // let's sort the array in descending order of date.
2084
+ uasort( $urls, array( $this, 'sort_modifed_date_descending' ) );
2085
+ $urls = array_slice( $urls, 0, apply_filters( $this->prefix . 'rss_latest_limit', 20 ) );
2086
+ }
2087
+
2088
+ foreach ( $urls as $url ) {
2089
+ echo
2090
+ '<item>
2091
+ <guid>' . esc_url( $url['loc'] ) . '</guid>
2092
+ <title>' . esc_html( $url['rss']['title'] ) . '</title>
2093
+ <link>' . esc_url( $url['loc'] ) . '</link>
2094
+ <description><![CDATA[' . $url['rss']['description'] . ']]></description>
2095
+ <pubDate>' . esc_html( $url['rss']['pubDate'] ) . '</pubDate>
2096
+ </item>';
2097
+ }
2098
+ echo '</channel></rss>';
2099
+ }
2100
+
2101
+ /**
2102
+ * Remove elements not containing the rss element.
2103
+ */
2104
+ public function include_in_rss( $array ) {
2105
+ return isset( $array['rss'] );
2106
+ }
2107
+
2108
+ /**
2109
+ * Sort on the basis of modified date.
2110
+ */
2111
+ public function sort_modifed_date_descending( $array1, $array2 ) {
2112
+ if ( ! isset( $array1['rss'] ) || ! isset( $array2['rss'] ) ) {
2113
+ return 0;
2114
+ }
2115
+ return $array1['rss']['timestamp'] < $array2['rss']['timestamp'];
2116
+ }
2117
+
2118
  /**
2119
  * Output the XML for a sitemap.
2120
  *
2121
  * @param $urls
2122
+ * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2123
  * @param string $comment
2124
  *
2125
  * @return null
2126
  */
2127
+ private function output_sitemap( $urls, $sitemap_type, $comment = '' ) {
2128
+ if ( 0 === strpos( $sitemap_type, 'rss' ) ) {
2129
+ // starts with rss.
2130
+ $this->output_rss( $urls, $sitemap_type, $comment );
2131
+ return;
2132
+ }
2133
+
2134
  $max_items = 50000;
2135
  if ( ! is_array( $urls ) ) {
2136
  return null;
2175
  foreach ( $urls as $url ) {
2176
  echo "\t<url>\r\n";
2177
  if ( is_array( $url ) ) {
2178
+ if ( isset( $url['rss'] ) ) {
2179
+ unset( $url['rss'] );
2180
+ }
2181
  foreach ( $url as $k => $v ) {
2182
  if ( ! empty( $v ) ) {
2183
  if ( 'loc' === $k ) {
2284
  * Return an XML sitemap as a string.
2285
  *
2286
  * @param $urls
2287
+ * @param string $sitemap_type The type of sitemap viz. root, rss, rss_latest etc.. For static sitemaps, this would be empty.
2288
  * @param string $comment
2289
  *
2290
  * @return string
2291
  */
2292
+ function build_sitemap( $urls, $sitemap_type, $comment = '' ) {
2293
  ob_start();
2294
+ $this->output_sitemap( $urls, $sitemap_type, $comment );
2295
 
2296
  return ob_get_clean();
2297
  }
2323
  }
2324
 
2325
  $pr_info['image:image'] = $this->get_images_from_term( $term );
2326
+ $pr_info['rss'] = array(
2327
+ 'title' => $term->name,
2328
+ 'description' => $term->description,
2329
+ 'pubDate' => $this->get_date_for_term( $term ),
2330
+ );
2331
  $prio[] = $pr_info;
2332
  }
2333
  }
2335
  return $prio;
2336
  }
2337
 
2338
+ /**
2339
+ * Return the date of the latest post in the given taxonomy term.
2340
+ *
2341
+ * @param WP_Term $term The taxonomy term.
2342
+ *
2343
+ * @return string
2344
+ */
2345
+ private function get_date_for_term( $term ) {
2346
+ $date = '';
2347
+ $query = new WP_Query( array(
2348
+ 'orderby' => 'post_date',
2349
+ 'order' => 'DESC',
2350
+ 'numberposts' => 1,
2351
+ 'post_type' => 'any',
2352
+ 'post_status' => 'publish',
2353
+ 'tax_query' => array(
2354
+ array(
2355
+ 'taxonomy' => $term->taxonomy,
2356
+ 'terms' => $term->term_id,
2357
+ ),
2358
+ ),
2359
+ ) );
2360
+
2361
+ if ( $query->have_posts() ) {
2362
+ $timestamp = mysql2date( 'U', $query->post->post_modified_gmt );
2363
+ $date = date( 'r', $timestamp );
2364
+ }
2365
+
2366
+ return $date;
2367
+ }
2368
+
2369
  /**
2370
  * Return a list of permalinks for an array of terms.
2371
  *
2680
  }
2681
 
2682
  if ( ! empty( $archives ) ) {
2683
+ return $this->get_prio_from_posts( $archives, $this->get_default_priority( 'archive', true ), $this->get_default_frequency( 'archive', true ),
2684
+ array(
2685
  $this,
2686
  'get_date_archive_link_from_post',
2687
+ ),
2688
+ 'archive'
2689
  );
2690
  }
2691
 
2787
  }
2788
  }
2789
 
2790
+ return $this->get_prio_from_posts( $authors, $this->get_default_priority( 'author', true ), $this->get_default_frequency( 'author', true ),
2791
+ array(
2792
  $this,
2793
  'get_author_link_from_post',
2794
+ ),
2795
+ 'author'
2796
  );
2797
  }
2798
 
2851
  * @param bool $prio_override
2852
  * @param bool $freq_override
2853
  * @param string $linkfunc
2854
+ * @param string $type Type of entity being fetched viz. author, post etc.
2855
  *
2856
  * @return array
2857
  */
2858
+ function get_prio_from_posts( $posts, $prio_override = false, $freq_override = false, $linkfunc = 'get_permalink', $type = 'post' ) {
2859
  $prio = array();
2860
  $args = array(
2861
  'prio_override' => $prio_override,
2868
  $stats = $this->get_comment_count_stats( $posts );
2869
  }
2870
  if ( is_array( $posts ) ) {
2871
+ foreach ( $posts as $key => $post ) {
2872
  // Determine if we check the post for images.
2873
  $is_single = true;
2874
  $post->filter = 'sample';
2875
+ $timestamp = null;
2876
  if ( 'get_permalink' === $linkfunc ) {
2877
  $url = $this->get_permalink( $post );
2878
  } else {
2890
  $date = $post->post_date_gmt;
2891
  }
2892
  if ( '0000-00-00 00:00:00' !== $date ) {
2893
+ $timestamp = $date;
2894
  $date = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $date ) );
2895
  } else {
2896
  $date = 0;
2930
  if ( is_float( $pr_info['priority'] ) ) {
2931
  $pr_info['priority'] = sprintf( '%0.1F', $pr_info['priority'] );
2932
  }
2933
+
2934
+ // add the rss specific data.
2935
+ if ( $timestamp ) {
2936
+ $title = null;
2937
+ switch ( $type ) {
2938
+ case 'author':
2939
+ $title = get_the_author_meta( 'display_name', $key );
2940
+ break;
2941
+ default:
2942
+ $title = get_the_title( $post );
2943
+ break;
2944
+ }
2945
+
2946
+ // RSS expects the GMT date.
2947
+ $timestamp = mysql2date( 'U', $post->post_modified_gmt );
2948
+ $pr_info['rss'] = array(
2949
+ 'title' => $title,
2950
+ 'description' => $this->get_the_excerpt( $post ),
2951
+ 'pubDate' => date( 'r', $timestamp ),
2952
+ 'timestamp' => $timestamp,
2953
+ 'post_type' => $post->post_type,
2954
+ );
2955
+ }
2956
+
2957
+
2958
  $pr_info['image:image'] = $is_single ? $this->get_images_from_post( $post ) : null;
2959
  $pr_info = apply_filters( $this->prefix . 'prio_item_filter', $pr_info, $post, $args );
2960
  if ( ! empty( $pr_info ) ) {
2966
  return $prio;
2967
  }
2968
 
2969
+ /**
2970
+ * Return the excerpt of the given post.
2971
+ *
2972
+ * @param WP_Post $post The post object.
2973
+ *
2974
+ * @return string
2975
+ */
2976
+ private function get_the_excerpt( $post ) {
2977
+ global $wp_version;
2978
+ if ( has_excerpt( $post->ID ) ) {
2979
+ if ( version_compare( $wp_version, '4.5.0', '>=' ) ) {
2980
+ return get_the_excerpt( $post );
2981
+ }
2982
+
2983
+ $text = strip_shortcodes( $post->post_content );
2984
+ $text = apply_filters( 'the_content', $text );
2985
+ $text = str_replace( ']]>', ']]&gt;', $text );
2986
+ $excerpt_length = apply_filters( 'excerpt_length', 55 );
2987
+ $excerpt_more = apply_filters( 'excerpt_more', '[&hellip;]' );
2988
+ return wp_trim_words( $text, $excerpt_length, $excerpt_more );
2989
+ }
2990
+ return '';
2991
+ }
2992
+
2993
  /**
2994
  * Return the images attached to the term.
2995
  *
3013
  if ( $thumbnail_id ) {
3014
  $image = wp_get_attachment_url( $thumbnail_id );
3015
  if ( $image ) {
3016
+ $image = aiosp_common::get_image_src_for_url( $image, 'full' );
3017
  $images['image:image'] = array(
3018
  'image:loc' => $image,
3019
  );
3054
  // Ignore all attachments except images.
3055
  return null;
3056
  }
3057
+ $attributes = wp_get_attachment_image_src( $post->ID, 'full' );
3058
  if ( $attributes ) {
3059
  $images[] = array(
3060
+ 'image:loc' => aiosp_common::clean_url( $attributes[0] ),
3061
+ 'image:caption' => wp_get_attachment_caption( $post->ID ),
3062
+ 'image:title' => get_the_title( $post->ID ),
3063
  );
3064
  }
3065
 
3085
  }
3086
 
3087
  if ( isset( $post_thumbnails[ $post->ID ] ) ) {
3088
+ $attachment_url = wp_get_attachment_image_url( $post_thumbnails[ $post->ID ], 'full' );
3089
  if ( $attachment_url ) {
3090
  $images[] = $attachment_url;
3091
  }
3094
  $content = '';
3095
  $content = $post->post_content;
3096
 
3097
+ $images = array_merge( $images, aiosp_common::parse_content_for_images( $post ) );
 
 
 
3098
 
3099
  if ( $images ) {
3100
  $tmp = $images;
3103
  $tmp = array_unique( $images );
3104
  }
3105
  // remove any invalid/empty images.
3106
+ $tmp = array_filter( $images, array( 'aiosp_common', 'is_image_valid' ) );
3107
  $images = array();
3108
  foreach ( $tmp as $image ) {
3109
+ $image = aiosp_common::get_image_src_for_url( $image, 'full' );
3110
+ $image_attributes = aiosp_common::get_image_attributes( $image );
3111
+ $images[] = array_merge(
3112
+ array(
3113
+ 'image:loc' => aiosp_common::clean_url( $image ),
3114
+ ),
3115
+ $image_attributes
3116
  );
3117
  }
3118
  }
3120
  return $images;
3121
  }
3122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3123
 
3124
  /**
3125
  * Cleans the URL so that its acceptable in the sitemap.
3140
  return apply_filters( 'aioseop_clean_url', $url );
3141
  }
3142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3143
  /**
3144
  * Return excluded categories for taxonomy queries.
3145
  *
3155
  if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
3156
  $args['number'] = $this->max_posts;
3157
  $args['offset'] = $page * $this->max_posts;
 
3158
  }
3159
 
3160
+ $args = apply_filters( $this->prefix . 'tax_args', $args, $page, $this->options );
3161
+
3162
  return $args;
3163
  }
3164
 
3548
  return $posts;
3549
  }
3550
  }
3551
+ }
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
- Stable tag: 2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
+ Stable tag: 2.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10