Changeset 2089413
- Timestamp:
- 05/16/2019 07:31:58 PM (5 years ago)
- Location:
- append-or-prepend-content/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
append-or-prepend-content/trunk/admin.php
r1522031 r2089413 7 7 8 8 public function __construct() { 9 add_action( 'admin_init' , array( $this, 'register_fields' ) );9 add_action( 'admin_init', 'register_fields' ) ); 10 10 } 11 11 … … 13 13 add_settings_section( 14 14 'apporprep_section', 15 __( 'Append or Prepend Content Settings', 'apporprep ' ),15 __( 'Append or Prepend Content Settings', 'apporprep' ), 16 16 array( $this, 'header_html' ), 17 17 'writing' … … 59 59 public function header_html() { 60 60 ?> 61 <p><?php _e( 'Allows you to append or prepend content to any Post Type on your site. Shortcodes allowed.', 'apporprep ' ); ?></p>61 <p><?php _e( 'Allows you to append or prepend content to any Post Type on your site. Shortcodes allowed.', 'apporprep' ); ?></p> 62 62 <?php 63 63 … … 69 69 public function prepend_html( $args ) { 70 70 $post_type = $args['post_type']; 71 $value = get_option( 'prepend_' . $post_type, '' ); 72 wp_editor( $value, 'prepend_' . $post_type, array( 'quicktags' => true, 'media_buttons' => true, 'textarea_rows' => 8, 'teeny' => true ) ); 71 $value = get_option( 'prepend_' . $post_type, '' ); 72 wp_editor( 73 $value, 74 'prepend_' . $post_type, 75 array( 76 'quicktags' => true, 77 'media_buttons' => true, 78 'textarea_rows' => 8, 79 'teeny' => true, 80 ) 81 ); 73 82 } 74 83 75 84 public function append_html( $args ) { 76 85 $post_type = $args['post_type']; 77 $value = get_option( 'append_' . $post_type, '' ); 78 wp_editor( $value, 'append_' . $post_type, array( 'quicktags' => true, 'media_buttons' => true, 'textarea_rows' => 8, 'teeny' => true ) ); 86 $value = get_option( 'append_' . $post_type, '' ); 87 wp_editor( 88 $value, 89 'append_' . $post_type, 90 array( 91 'quicktags' => true, 92 'media_buttons' => true, 93 'textarea_rows' => 8, 94 'teeny' => true, 95 ) 96 ); 79 97 } 80 98 -
append-or-prepend-content/trunk/app-prep-content.php
r1522031 r2089413 1 <?php 1 <?php 2 2 3 3 /** … … 5 5 * Description: Add content before or after every post, page or Custom Post Type 6 6 * Plugin URI: https://wordpress.org/plugins/app-prep-content 7 * Version: 1.1 7 * Version: 1.1 8 8 * Author: igmoweb 9 9 * Author URI: http://igmoweb.com … … 12 12 * License: GPLv2 or later (license.txt) 13 13 */ 14 14 15 15 class AppOrPrepp { 16 /** 17 * Plugin instance. 18 * 19 * @var AppOrPrepp 20 */ 16 21 private static $instance; 17 22 23 24 25 26 27 18 28 public static function get_instance() { 19 29 if ( ! self::$instance ) { … … 24 34 } 25 35 36 37 38 26 39 public function __construct() { 27 40 if ( is_admin() ) { 28 include_once ( plugin_dir_path( __FILE__ ) . '/admin.php' );41 include_once; 29 42 new AppOrPrepp_Admin(); 30 43 } … … 35 48 } 36 49 50 51 52 37 53 public function load_text_domain() { 38 54 load_plugin_textdomain( 'apporprepp', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' ); 39 55 } 40 56 57 58 59 60 61 62 63 41 64 public function the_content( $content ) { 42 65 $post = get_post(); … … 56 79 } 57 80 58 add_action( 'plugins_loaded', 'app_or_prepp' ); 81 add_action( 'plugins_loaded', 'app_or_prepp' ); 82 /** 83 * Return the plugin instance 84 * 85 * @return AppOrPrepp 86 */ 59 87 function app_or_prepp() { 60 88 return AppOrPrepp::get_instance(); -
append-or-prepend-content/trunk/languages/apporprepp.pot
r1374049 r2089413 1 # Copyright (C) 201 6 Append or Prepend Content2 # This file is distributed under the same license as the Append or Prepend Content package.1 # Copyright (C) 201 2 # This file is distributed under the . 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Append or Prepend Content 1.0\n" 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/app-prep-content\n" 7 "POT-Creation-Date: 2016-03-17 09:16:42+00:00\n" 5 "Project-Id-Version: Append or Prepend Content 1.1.1\n" 6 "Report-Msgid-Bugs-To: " 7 "https://wordpress.org/support/plugin/append-or-prepend-content\n" 8 "POT-Creation-Date: 2019-05-16 19:27:30+00:00\n" 8 9 "MIME-Version: 1.0\n" 9 "Content-Type: text/plain; charset= UTF-8\n"10 "Content-Type: text/plain; charset=-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 201 6-MO-DA HO:MI+ZONE\n"12 "PO-Revision-Date: 201-MO-DA HO:MI+ZONE\n" 12 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 14 "Language-Team: LANGUAGE <LL@li.org>\n" 15 14 16 15 #: admin.php:15 17 #: admin.php:15 build/admin.php:15 svn/tags/1.0/admin.php:15 18 #: svn/tags/1.1/admin.php:15 svn/tags/1.1.1/admin.php:15 svn/trunk/admin.php:15 16 19 msgid "Append or Prepend Content Settings" 17 20 msgstr "" 18 21 19 #: admin.php:28 20 msgctxt "%s is the post type" 21 msgid "Prepend content to %s" 22 msgstr "" 23 24 #: admin.php:37 25 msgctxt "%s is the post type" 26 msgid "Append content to %s" 27 msgstr "" 28 29 #: admin.php:61 22 #: admin.php:61 build/admin.php:61 svn/tags/1.0/admin.php:61 23 #: svn/tags/1.1/admin.php:61 svn/tags/1.1.1/admin.php:61 svn/trunk/admin.php:61 30 24 msgid "" 31 25 "Allows you to append or prepend content to any Post Type on your site. " … … 52 46 msgid "http://igmoweb.com" 53 47 msgstr "" 48 49 50 51 52 53 54 55 56 57 58 59 -
append-or-prepend-content/trunk/readme.txt
r1522031 r2089413 3 3 Tags: content,posts,custom post type 4 4 Requires at least: 4.0 5 Tested up to: 4.6.16 Stable tag: 1.1 5 Tested up to: 6 Stable tag: 1.1 7 7 License: GPLv2 or later 8 8 … … 22 22 23 23 == Changelog == 24 25 26 24 27 = 1.1 = 25 28 Added media buttons and HTML mode in editors
Note: See TracChangeset
for help on using the changeset viewer.