Changeset 1406772
- Timestamp:
- 04/28/2016 07:36:44 PM (10 years ago)
- Location:
- ytsubscribe/trunk
- Files:
-
- 4 edited
-
admin/index.php (modified) (3 diffs)
-
index.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
ytSubscribe.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ytsubscribe/trunk/admin/index.php
r1406540 r1406772 25 25 register_setting( 'ytSubscribe-settings-group', 'ytSubscribe_layout' ); 26 26 register_setting( 'ytSubscribe-settings-group', 'ytSubscribe_dom' ); 27 register_setting( 'ytSubscribe-settings-group', 'ytSubscribe_subscribe_text'); 28 register_setting( 'ytSubscribe-settings-group', 'ytSubscribe_customcss'); 27 29 } 28 30 … … 31 33 $theme = array("default","dark","grey"); 32 34 $layout = array("default","full"); 35 33 36 ?> 34 37 <div class="wrap"> 35 <h2>ytSub csribe</h2>38 <h2>ytSubscsribe</h2> 36 39 37 40 <form method="post" action="options.php"> … … 92 95 <td><input type="text" name="ytSubscribe_dom" value="<?php echo esc_attr( get_option('ytSubscribe_dom',"body") ); ?>" /></td> 93 96 <td>If "<strong>body</strong>" is not working, then replace it to <strong>.single-content</strong> or <strong>.post-single-content</strong></td> 97 </tr> 98 <tr valign="top"> 99 <th scope="row">Subscribe Text</th> 100 <td><input type="text" name="ytSubscribe_subscribe_text" value="<?php echo esc_attr( get_option('ytSubscribe_subscribe_text',"Subscribe to My Coding Tricks") ); ?>" /></td> 101 <td></td> 102 </tr> 103 104 <tr valign="top"> 105 <th scope="row">Custom CSS</th> 106 <td><textarea name="ytSubscribe_customcss" style="min-height:150px"><?php echo esc_attr( get_option('ytSubscribe_customcss',".ytSubscribe-inner h3{padding:0px;float:left;color:#000;margin:9px 5px 0px 0px;line-height: 20px;font-size: 18px;}") ); ?></textarea></td> 107 <td></td> 94 108 </tr> 95 109 -
ytsubscribe/trunk/index.php
r1406540 r1406772 4 4 * Plugin URI: http://mycodingtricks.com 5 5 * Description: ytSubscribe is a Youtube Subscribe Button jQuery Plugin that automatically inserts Youtube Subscribe Button Below each Video in your WordPress Post. 6 * Version: 2. 06 * Version: 2.1 7 7 * Author: Shubham Kumar 8 8 * Author URI: http://mycodingtricks.com … … 18 18 ); 19 19 20 function ytSubscribe_action_links($links){ 21 $mylinks = array( 22 "<a href='".admin_url('admin.php?page=ytsubscribe/admin/index.php')."'>Settings</a>", 23 "<a href='http://mycodingtricks.com/wordpress/ytsubscribe-wordpress-plugin/' target=_blank>Tutorial</a>" 24 ); 25 return array_merge($links,$mylinks); 26 } 27 28 20 29 //Don't Edit after this 21 30 … … 23 32 function load_ytSubscribe(){ 24 33 wp_enqueue_script('ytSubscribe',plugins_url('ytSubscribe.js',__FILE__),array('jquery'),$ver); 34 } 35 function ytSubscribe_customcss(){ 36 echo "<style>".esc_attr( get_option('ytSubscribe_customcss',".ytSubscribe-inner h3{padding:0px;float:left;color:#000;margin:9px 5px 0px 0px;line-height: 20px;font-size: 18px;}") )."</style>"; 25 37 } 26 38 function add_ytSubscribe($content){ … … 34 46 layout: '".$config['layout']."', 35 47 }, 36 structure: \"<\"+\"h3 style='padding:0px;float:left;color:#000;margin:5px;line-height: 20px;font-size: 18px;'>Subscribe to My Coding Tricks\"+\"</\h3>\"+\"<\"+\"div class='ytSubscribe-btn'></\div>\"48 structure: \"<\"+\"h3>".esc_attr( get_option('ytSubscribe_subscribe_text',"Subscribe to My Coding Tricks") )."<\"+\"/\h3>\"+\"<\"+\"div class='ytSubscribe-btn'></\div>\" 37 49 }); 38 50 })(jQuery); … … 40 52 return $content; 41 53 } 54 add_action('wp_head','ytSubscribe_customcss'); 42 55 add_action('wp_enqueue_scripts','load_ytSubscribe'); 43 56 add_filter('the_content','add_ytSubscribe'); 57 add_filter('plugin_action_links_'.plugin_basename(__FILE__),'ytSubscribe_action_links'); -
ytsubscribe/trunk/readme.txt
r1406540 r1406772 5 5 Requires at least: 3.1 6 6 Tested up to: 4.5 7 Stable tag: 2. 07 Stable tag: 2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 19 19 == Screenshots == 20 20 1. Working Demo. 21 2. ytSubscribe Admin Panel 21 22 22 23 == Frequently Asked Questions == -
ytsubscribe/trunk/ytSubscribe.js
r1406486 r1406772 69 69 } 70 70 function style(){ 71 $("head").append("<style>@media (max-width:480px){ .ytSubscribe-inner>* {float:none;}}.ytSubscribe-iframe .ytSubscribe{background:#F9F9F9;}.ytSubscribe-iframe.grey .ytSubscribe h3 {color: #fff !important;}.ytSubscribe-iframe.grey .ytSubscribe{background: #202020;color: #fff !important;}.ytSubscribe-iframe.dark .ytSubscribe{background:black;color:#fff !important;}.ytSubscribe{position:absolute;height:40px;width:100%;text-align:center;}.ytSubscribe-iframe>iframe{border:0px;margin-bottom:0px!important;}.ytSubscribe-btn{display:inline-block;width:190px;}.ytSubscribe-inner>*{float:left;}</style>");71 $("head").append("<style>@media (max-width:480px){ytSubscribe-inner h3{margin:0px 5px 0px 5px;}.ytSubscribe-inner>* {float:none;}}.ytSubscribe-iframe .ytSubscribe{background:#F9F9F9;}.ytSubscribe-iframe.grey .ytSubscribe h3 {color: #fff !important;}.ytSubscribe-iframe.grey .ytSubscribe{background: #202020;color: #fff !important;}.ytSubscribe-iframe.dark .ytSubscribe{background:black;color:#fff !important;}.ytSubscribe{position:absolute;height:40px;width:100%;text-align:center;}.ytSubscribe-iframe>iframe{border:0px;margin-bottom:0px!important;}.ytSubscribe-btn{display:inline-block;width:190px;}.ytSubscribe-inner>*{float:left;}</style>"); 72 72 } 73 73 function addYoutubeButton($iframe){
Note: See TracChangeset
for help on using the changeset viewer.