Plugin Directory

Changeset 2563923


Ignore:
Timestamp:
07/13/2021 11:10:45 PM (4 years ago)
Author:
circlecube
Message:

Update to version 0.4 from GitHub

Location:
lorem-ipsum-replace-content
Files:
4 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • lorem-ipsum-replace-content/tags/0.4/lorem-ipsum-replace-content.php

    r1225083 r2563923  
    11<?php
     2/**
     3 * Plugin Name:       Lorem Ipsum Replace Content
     4 * Plugin URI:        https://github.com/circlecube/lorem-ipsum-replace-content
     5 * Description:       Render your content with lorem ipsum, word for word.
     6 * Version:           0.4
     7 * Requires at least: 5.2
     8 * Requires PHP:      7.2
     9 * Author:            Evan Mullins
     10 * Author URI:        https://circlecube.com
     11 * License:           GPLv2 or later
     12 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     13 */
     14
    215/*
    3 Plugin Name: Lorem Ipsum Replace Content
    4 Plugin URI: http://circlecube.com
    5 Description: Replace your content with lorem ipsum, word for word.
    6 Version: 0.3
    7 Author: Evan Mullins
    8 Author Email: [email protected]
    9 License: GPLv2 or later
    1016
    11   Copyright 2011 Evan Mullins ([email protected])
     17  Copyright 2021 Evan Mullins ([email protected])
    1218
    1319  This program is free software; you can redistribute it and/or modify
     
    2834class LoremIpsumReplaceContent {
    2935
    30     /*--------------------------------------------*
    31      * Constants
    32      *--------------------------------------------*/
    33     const name = 'Lorem Ipsum Replace Content';
    34     const slug = 'lorem_ipsum_replace_content';
    35    
    3636    /**
    3737     * Constructor
    3838     */
    3939    function __construct() {
    40         //register an activation hook for the plugin
    41         register_activation_hook( __FILE__, array( &$this, 'install_lorem_ipsum_replace_content' ) );
    42 
    4340        //Hook up to the init action
    4441        add_action( 'init', array( &$this, 'init_lorem_ipsum_replace_content' ) );
    45     }
    46  
    47     /**
    48      * Runs when the plugin is activated
    49      */ 
    50     function install_lorem_ipsum_replace_content() {
    51         // do not generate any output here
    5242    }
    5343 
     
    5646     */
    5747    function init_lorem_ipsum_replace_content() {
    58         // Load JavaScript and stylesheets
    59         $this->register_scripts_and_styles();
    60 
    61    
    62         if ( is_admin() ) {
    63             //this will run when in the WordPress admin
    64         } else {
    65             //this will run when on the frontend
    66         }
    67 
    68         /*
    69          * TODO: Define custom functionality for your plugin here
    70          *
    71          * For more information:
    72          * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
    73          */
    74         // add_action( 'your_action_here', array( &$this, 'action_callback_method_name' ) );
    7548        add_filter( 'the_content', array( &$this, 'lorem_ipsumize_the_content' ) );   
    76     }
    77 
    78     function action_callback_method_name() {
    79         // TODO define your action method here
    80     }
    81 
    82     function filter_callback_method_name() {
    83         // TODO define your filter method here
    8449    }
    8550
     
    138103    }
    139104 
    140     /**
    141      * Registers and enqueues stylesheets for the administration panel and the
    142      * public facing site.
    143      */
    144     private function register_scripts_and_styles() {
    145         if ( is_admin() ) {
    146 
    147         } else {
    148 
    149         } // end if/else
    150     } // end register_scripts_and_styles
    151    
    152     /**
    153      * Helper function for registering and enqueueing scripts and styles.
    154      *
    155      * @name    The     ID to register with WordPress
    156      * @file_path       The path to the actual file
    157      * @is_script       Optional argument for if the incoming file_path is a JavaScript source file.
    158      */
    159     private function load_file( $name, $file_path, $is_script = false ) {
    160 
    161         $url = plugins_url($file_path, __FILE__);
    162         $file = plugin_dir_path(__FILE__) . $file_path;
    163 
    164         if( file_exists( $file ) ) {
    165             if( $is_script ) {
    166                 wp_register_script( $name, $url, array('jquery') ); //depends on jquery
    167                 wp_enqueue_script( $name );
    168             } else {
    169                 wp_register_style( $name, $url );
    170                 wp_enqueue_style( $name );
    171             } // end if
    172         } // end if
    173 
    174     } // end load_file
    175  
    176105} // end class
    177106new LoremIpsumReplaceContent();
  • lorem-ipsum-replace-content/tags/0.4/readme.txt

    r1225083 r2563923  
    44Tags: lorem ipsum
    55Requires at least: 3
    6 Tested up to: 4.3
    7 Stable tag: 0.3
     6Tested up to: 5.8
     7Stable tag: 0.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717You created a site and want to show it off, but the client does not want their copy used. Just install this plugin and every word in their posts will be swapped out for beautimus latin.
    1818
     19Note: This does not replace content in the front end. It created a filter that replaces content on the front end of the site only.
     20
    1921== Installation ==
    2022
     
    25271. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
    26281. Activate the plugin through the 'Plugins' menu in WordPress
    27 1. Read lorem ipsum
     291. See site content replaced with lorem ipsum on the front end.
    2830
    2931== Frequently Asked Questions ==
     
    3941== Changelog ==
    4042
     43= 0.4 =
     44Update latest testing version.
     45
    4146= 0.3 =
    4247Update to avoid replacing shortcodes.
  • lorem-ipsum-replace-content/trunk/lorem-ipsum-replace-content.php

    r1225083 r2563923  
    11<?php
     2/**
     3 * Plugin Name:       Lorem Ipsum Replace Content
     4 * Plugin URI:        https://github.com/circlecube/lorem-ipsum-replace-content
     5 * Description:       Render your content with lorem ipsum, word for word.
     6 * Version:           0.4
     7 * Requires at least: 5.2
     8 * Requires PHP:      7.2
     9 * Author:            Evan Mullins
     10 * Author URI:        https://circlecube.com
     11 * License:           GPLv2 or later
     12 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
     13 */
     14
    215/*
    3 Plugin Name: Lorem Ipsum Replace Content
    4 Plugin URI: http://circlecube.com
    5 Description: Replace your content with lorem ipsum, word for word.
    6 Version: 0.3
    7 Author: Evan Mullins
    8 Author Email: [email protected]
    9 License: GPLv2 or later
    1016
    11   Copyright 2011 Evan Mullins ([email protected])
     17  Copyright 2021 Evan Mullins ([email protected])
    1218
    1319  This program is free software; you can redistribute it and/or modify
     
    2834class LoremIpsumReplaceContent {
    2935
    30     /*--------------------------------------------*
    31      * Constants
    32      *--------------------------------------------*/
    33     const name = 'Lorem Ipsum Replace Content';
    34     const slug = 'lorem_ipsum_replace_content';
    35    
    3636    /**
    3737     * Constructor
    3838     */
    3939    function __construct() {
    40         //register an activation hook for the plugin
    41         register_activation_hook( __FILE__, array( &$this, 'install_lorem_ipsum_replace_content' ) );
    42 
    4340        //Hook up to the init action
    4441        add_action( 'init', array( &$this, 'init_lorem_ipsum_replace_content' ) );
    45     }
    46  
    47     /**
    48      * Runs when the plugin is activated
    49      */ 
    50     function install_lorem_ipsum_replace_content() {
    51         // do not generate any output here
    5242    }
    5343 
     
    5646     */
    5747    function init_lorem_ipsum_replace_content() {
    58         // Load JavaScript and stylesheets
    59         $this->register_scripts_and_styles();
    60 
    61    
    62         if ( is_admin() ) {
    63             //this will run when in the WordPress admin
    64         } else {
    65             //this will run when on the frontend
    66         }
    67 
    68         /*
    69          * TODO: Define custom functionality for your plugin here
    70          *
    71          * For more information:
    72          * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
    73          */
    74         // add_action( 'your_action_here', array( &$this, 'action_callback_method_name' ) );
    7548        add_filter( 'the_content', array( &$this, 'lorem_ipsumize_the_content' ) );   
    76     }
    77 
    78     function action_callback_method_name() {
    79         // TODO define your action method here
    80     }
    81 
    82     function filter_callback_method_name() {
    83         // TODO define your filter method here
    8449    }
    8550
     
    138103    }
    139104 
    140     /**
    141      * Registers and enqueues stylesheets for the administration panel and the
    142      * public facing site.
    143      */
    144     private function register_scripts_and_styles() {
    145         if ( is_admin() ) {
    146 
    147         } else {
    148 
    149         } // end if/else
    150     } // end register_scripts_and_styles
    151    
    152     /**
    153      * Helper function for registering and enqueueing scripts and styles.
    154      *
    155      * @name    The     ID to register with WordPress
    156      * @file_path       The path to the actual file
    157      * @is_script       Optional argument for if the incoming file_path is a JavaScript source file.
    158      */
    159     private function load_file( $name, $file_path, $is_script = false ) {
    160 
    161         $url = plugins_url($file_path, __FILE__);
    162         $file = plugin_dir_path(__FILE__) . $file_path;
    163 
    164         if( file_exists( $file ) ) {
    165             if( $is_script ) {
    166                 wp_register_script( $name, $url, array('jquery') ); //depends on jquery
    167                 wp_enqueue_script( $name );
    168             } else {
    169                 wp_register_style( $name, $url );
    170                 wp_enqueue_style( $name );
    171             } // end if
    172         } // end if
    173 
    174     } // end load_file
    175  
    176105} // end class
    177106new LoremIpsumReplaceContent();
  • lorem-ipsum-replace-content/trunk/readme.txt

    r1225083 r2563923  
    44Tags: lorem ipsum
    55Requires at least: 3
    6 Tested up to: 4.3
    7 Stable tag: 0.3
     6Tested up to: 5.8
     7Stable tag: 0.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717You created a site and want to show it off, but the client does not want their copy used. Just install this plugin and every word in their posts will be swapped out for beautimus latin.
    1818
     19Note: This does not replace content in the front end. It created a filter that replaces content on the front end of the site only.
     20
    1921== Installation ==
    2022
     
    25271. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
    26281. Activate the plugin through the 'Plugins' menu in WordPress
    27 1. Read lorem ipsum
     291. See site content replaced with lorem ipsum on the front end.
    2830
    2931== Frequently Asked Questions ==
     
    3941== Changelog ==
    4042
     43= 0.4 =
     44Update latest testing version.
     45
    4146= 0.3 =
    4247Update to avoid replacing shortcodes.
Note: See TracChangeset for help on using the changeset viewer.