Changeset 1458008
- Timestamp:
- 07/21/2016 07:18:51 AM (10 years ago)
- Location:
- facebook-ogg-meta-tags
- Files:
-
- 20 added
- 3 edited
-
tags/1.4 (added)
-
tags/1.4/index.php (added)
-
tags/1.4/metaTags (added)
-
tags/1.4/metaTags/css (added)
-
tags/1.4/metaTags/css/social-meta-tags-front.css (added)
-
tags/1.4/metaTags/images (added)
-
tags/1.4/metaTags/images/512.png (added)
-
tags/1.4/metaTags/images/facebook.png (added)
-
tags/1.4/metaTags/images/google.png (added)
-
tags/1.4/metaTags/images/linkedin.png (added)
-
tags/1.4/metaTags/images/twitter.png (added)
-
tags/1.4/metaTags/js (added)
-
tags/1.4/metaTags/js/social-meta-tags-front.js (added)
-
tags/1.4/metaTags/metaTags.php (added)
-
tags/1.4/readme.txt (added)
-
tags/1.4/screenshot-1.png (added)
-
trunk/index.php (modified) (1 diff)
-
trunk/metaTags/css/social-meta-tags-admin.css (added)
-
trunk/metaTags/images/32.png (added)
-
trunk/metaTags/js/social-meta-tags-admin.js (added)
-
trunk/metaTags/metaTags.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/screenshot-2.png (added)
Legend:
- Unmodified
- Added
- Removed
-
facebook-ogg-meta-tags/trunk/index.php
r1452723 r1458008 4 4 Description: Social Meta Tags will generate social media meta data for all new posts that you publish. This allows to share the right titles, descriptions, images and more when your posts are shared into Twitter, Facebook. 5 5 Plugin URI: https://wordpress.org/plugins/facebook-ogg-meta-tags/ 6 Version: 1. 46 Version: 1.5 7 7 Author: Bassem Rabia 8 8 Author URI: mailto:bassem.rabia@gmail.com -
facebook-ogg-meta-tags/trunk/metaTags/metaTags.php
r1452723 r1458008 12 12 'pluginNiceName' => 'Social Meta Tags', 13 13 'pluginSlug' => 'social-meta-tags', 14 'pluginVersion' => '1. 0'14 'pluginVersion' => '1.5' 15 15 ); 16 add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue')); 17 add_action('admin_menu', array(&$this, 'menu')); 16 18 add_action('wp_head', array(&$this, 'init')); 17 19 add_action('wp_enqueue_scripts', array(&$this, 'enqueue')); 18 add_action('wp_head', array(&$this, 'run'));19 20 } 20 21 22 public function admin_enqueue(){ 23 wp_enqueue_style($this->Signature['pluginSlug'].'-admin-style', plugins_url('css/'.$this->Signature['pluginSlug'].'-admin.css', __FILE__)); 24 wp_enqueue_script($this->Signature['pluginSlug'].'-admin-script', plugins_url('js/'.$this->Signature['pluginSlug'].'-admin.js', __FILE__)); 25 } 26 27 public function menu(){ 28 add_options_page( 29 $this->Signature['pluginNiceName'], 30 $this->Signature['pluginNiceName'], 31 'manage_options', 32 strtolower($this->Signature['pluginSlug']).'-main-menu', 33 array(&$this, 'page') 34 ); 35 $pluginOptions = get_option($this->Signature['pluginSlug']); 36 if(count($pluginOptions)==1){ 37 add_option($this->Signature['pluginSlug'], $this->Signature, '', 'yes'); 38 } 39 } 40 41 public function page(){ 42 ?> 43 <div class="wrap columns-2 <?php echo $this->Signature['pluginSlug'];?>_wrap"> 44 <div id="<?php echo $this->Signature['pluginSlug'];?>" class="icon32"></div> 45 <h2><?php echo $this->Signature['pluginName'] .' '.$this->Signature['pluginVersion']; //echo get_locale();?></h2> 46 <div id="poststuff"> 47 <div id="post-body" class="metabox-holder columns-2"> 48 <div id="postbox-container-1" class="postbox-container <?php echo $this->Signature['pluginSlug'];?>_container"> 49 <div class="postbox"> 50 <h3><span><?php _e('User Guide', 'social-meta-tags'); ?></span></h3> 51 <div class="inside"> 52 <ol> 53 <li><?php _e('Install', 'social-meta-tags'); ?></li> 54 <li><?php _e('Run', 'social-meta-tags'); ?></li> 55 <li><?php _e('Enjoy', 'social-meta-tags'); ?></li> 56 <li><?php _e('Ask for Support if you need', 'social-meta-tags'); ?> !</li> 57 </ol> 58 </div> 59 </div> 60 </div> 61 62 <div id="postbox-container-2" class="postbox-container"> 63 <div id="<?php echo $this->Signature['pluginSlug'];?>_container"> 64 <?php 65 $pluginOptions = get_option($this->Signature['pluginSlug']); 66 // echo '<pre>';print_r($pluginOptions);echo '</pre>'; 67 if(isset($_POST[$this->Signature['pluginSlug'].'-enabled'])){ 68 $pluginOptions['enabled'] = $_POST[$this->Signature['pluginSlug'].'-enabled']; 69 // echo '<pre>';print_r($pluginOptions);echo '</pre>'; 70 update_option($this->Signature['pluginSlug'], $pluginOptions); 71 ?> 72 <div class="accordion-header accordion-notification accordion-notification-success"> 73 <i class="fa dashicons dashicons-no-alt"></i> 74 <span class="dashicons dashicons-megaphone"></span> 75 <?php echo $this->Signature['pluginName'];?> 76 <?php echo __('has been successfully updated', 'social-meta-tags');?>. 77 </div> <?php 78 $pluginOptions = get_option($this->Signature['pluginSlug']); 79 // echo '<pre>';print_r($pluginOptions);echo '</pre>'; 80 } 81 ?> 82 <div class="<?php echo $this->Signature['pluginSlug'];?>_service_content"> 83 <div class="accordion-header"> 84 <i class="fa dashicons dashicons-arrow-down"></i> 85 <span class="dashicons dashicons-hidden"></span> 86 <?php echo __('Enable Scoial Buttons', 'social-meta-tags');?> 87 </div> 88 <div class="<?php echo $this->Signature['pluginSlug'];?>_service_content <?php echo $this->Signature['pluginSlug'];?>_service_content_active"> 89 <form method="POST" action="" /> 90 <input <?php echo (!isset($pluginOptions['enabled']) || $pluginOptions['enabled'] == 1)?'checked':'';?> type="radio" name="<?php echo $this->Signature['pluginSlug'];?>-enabled" value="1" /> <?php echo __('Enable', 'social-meta-tags');?> 91 <input <?php echo ($pluginOptions['enabled'] == 0)?'checked':'';?> type="radio" name="<?php echo $this->Signature['pluginSlug'];?>-enabled" value="0" /> <?php echo __('Disable', 'social-meta-tags');?> 92 93 <input class="<?php echo $this->Signature['pluginSlug'];?>_submit" type="submit" value="<?php echo __('Save', 'social-meta-tags');?>" /> 94 <div class="clear"></div> 95 </form> 96 </div> 97 </div> 98 </div> 99 </div> 100 </div> 101 </div> 102 </div> 103 <?php 104 } 105 21 106 public function enqueue(){ 22 107 wp_enqueue_style($this->Signature['pluginSlug'].'-front-style', plugins_url('css/'.$this->Signature['pluginSlug'].'-front.css', __FILE__)); … … 25 110 26 111 public function init(){ 112 $pluginOptions = get_option($this->Signature['pluginSlug']); 113 // echo '<p&re>';print_r($pluginOptions);echo '</pre>'; 114 27 115 $url = plugin_dir_url(__FILE__).'/images/512.png'; 28 116 if(has_post_thumbnail()) … … 51 139 <!-- ------------------ --> 52 140 <?php 53 } 54 55 public function run(){ 56 if(is_single() AND get_post_type() == 'post'){ 141 // echo $pluginOptions['enabled']; 142 if(is_single() AND get_post_type() == 'post' AND $pluginOptions['enabled'] == 1){ 57 143 function my_metaTags($content){ 58 144 global $post; … … 79 165 // self::get(); 80 166 } 167 81 168 } 82 169 } -
facebook-ogg-meta-tags/trunk/readme.txt
r1452728 r1458008 5 5 Requires at least: 3.4.0 6 6 Tested up to: 4.5.3 7 Stable tag: 1. 47 Stable tag: 1.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 == Screenshots == 25 25 26 1. Social Meta Tags 26 1. Social Meta Tags - front web site 27 1. Social Meta Tags - admin panel 27 28 28 29 == Upgrade Notice == 29 30 31 = 1.5 = 30 32 = 1.4 = 31 33 = 1.3.1 = … … 36 38 37 39 == Changelog == 40 41 = 1.5 = 42 * Enable - disable share buttons into post page 38 43 39 44 = 1.4 =
Note: See TracChangeset
for help on using the changeset viewer.