Changeset 2784121
- Timestamp:
- 09/13/2022 03:46:32 PM (4 years ago)
- Location:
- linky/trunk
- Files:
-
- 7 edited
-
linky.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/Controllers/ajaxController.php (modified) (1 diff)
-
src/Controllers/indexController.php (modified) (2 diffs)
-
src/Helper/WPLinkyHelper.php (modified) (1 diff)
-
views/front/html/header.php (modified) (2 diffs)
-
views/front/page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
linky/trunk/linky.php
r2761812 r2784121 12 12 Description: Create & manage link’s hub for your 13 13 social profile directly in your websites 14 Version: 1. 3.914 Version: 1.4.1 15 15 Author Name: Nicolas RIVIERE (hello@undefined.fr) 16 16 Author: Nicolas RIVIERE (Undefined) -
linky/trunk/readme.txt
r2761812 r2784121 4 4 Tags: linktree, later, links, bio links, social 5 5 Requires at least: 4.0 6 Tested up to: 6.0 7 Stable tag: 1. 3.96 Tested up to: 6.0.2 7 Stable tag: 1.4.1 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 197 197 * Support EWWW Image Optimizer lazyload 198 198 199 =1.4.0= 200 * Fix undefined prefix url 201 * test on latest WordPress version 202 203 =1.4.1= 204 * Remove yoast meta 205 199 206 == Upgrade Notice == 200 207 -
linky/trunk/src/Controllers/ajaxController.php
r2512695 r2784121 41 41 { 42 42 if(!empty($_POST['_group'])){ 43 global $wpLinky; 44 43 45 $data = $this->_save(); 46 $data['page_url'] = $wpLinky->getIndexController()->getSettings()->getPageUrl($data['global']['slug']); 44 47 wp_send_json_success($data); 45 48 } -
linky/trunk/src/Controllers/indexController.php
r2318116 r2784121 37 37 $this->menu = new Menu(!empty($data['appareance']['menu']) ? $data['appareance']['menu'] : false); 38 38 $this->links = new Links($data['links']); 39 40 if ( WPLinkyHelper::pluginsExists(['wordpress-seo/wp-seo.php','wordpress-seo-premium/wp-seo-premium.php'] ) ) { 41 foreach(['robots','canonical','metadesc','metakeywords','opengraph_title','opengraph_desc','opengraph_url','opengraph_type','opengraph_image','opengraph_site_name','opengraph_admin','opengraph_author_facebook','opengraph_show_publish_date','twitter_title','twitter_description','twitter_card_type','twitter_site','twitter_image','twitter_creator_account','json_ld_output'] as $filter) { 42 add_filter('wpseo_' . $filter, [$this, 'remove_yoast_metas']); 43 } 44 } 39 45 } 40 46 … … 83 89 return $page; 84 90 } 91 } 85 92 93 /** 94 * Remove yoast meta for linky page 95 * 96 * @param $content 97 * @return false|mixed 98 */ 99 public function remove_yoast_metas( $content ) { 100 if(!empty( get_query_var( 'is_linky' ) )) { 101 return apply_filters(UNDFND_WP_LINKY_DOMAIN . '_yoast_meta_' . current_filter(), false); 102 } 103 104 return $content; 86 105 } 87 106 } -
linky/trunk/src/Helper/WPLinkyHelper.php
r2517498 r2784121 223 223 return $array; 224 224 } 225 226 /** 227 * Check if plugin exist 228 * 229 * @param $plugins $array 230 * 231 * @return mixed 232 */ 233 public static function pluginsExists( $plugins ) { 234 $exist = false; 235 foreach ( $plugins as $plugin ) { 236 if(is_plugin_active($plugin)) 237 $exist = true; 238 } 239 return $exist; 240 } 225 241 } -
linky/trunk/views/front/html/header.php
r2319174 r2784121 21 21 $background = ($backgroundType == 'none') ? '#FFF' : $page->get('header_background_color', '#FFF'); 22 22 } 23 24 $title = $page->get('title') ? $page->get('title') : __('My links', 'linky') . ' | ' . get_bloginfo('blogname'); 25 $yoastExist = WPLinkyHelper::pluginsExists(['wordpress-seo/wp-seo.php','wordpress-seo-premium/wp-seo-premium.php'] ); 26 add_filter(($yoastExist ? 'wpseo_title' : 'pre_get_document_title'), function() use ($title) { 27 return $title; 28 }); 23 29 ?> 24 30 <html> … … 27 33 <meta name="msapplication-navbutton-color" content="<?php echo $background; ?>"> 28 34 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 29 <title><?php echo $page->get('title') ? $page->get('title') : __('My links', 'linky') . ' | ' . get_bloginfo('blogname'); ?></title>30 35 <?php wp_head(); ?> 31 36 <?php if($analytics): ?> -
linky/trunk/views/front/page.php
r2355170 r2784121 14 14 $indexController = $wpLinky->getIndexController(); 15 15 $page = $indexController->getPage(); 16 $socials = $indexController->getSocials(); 16 17 $theme_id = $page->get('body_theme', 'default'); 17 18
Note: See TracChangeset
for help on using the changeset viewer.