Skip to content

Commit 3ad7b14

Browse files
committed
Changed to the new plugin structure. Here we go
1 parent cf9c232 commit 3ad7b14

File tree

245 files changed

+1180
-2782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+1180
-2782
lines changed

README.txt

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
=== Plugin Name ===
2+
Contributors: (this should be a list of wordpress.org userids)
3+
Donate link: http://example.com/
4+
Tags: comments, spam
5+
Requires at least: 3.5.1
6+
Tested up to: 3.6
7+
Stable tag: 1.0.0
8+
License: GPLv2 or later
9+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10+
11+
Here is a short description of the plugin. This should be no more than 150 characters. No markup here.
12+
13+
== Description ==
14+
15+
This is the long description. No limit, and you can use Markdown (as well as in the following sections).
16+
17+
For backwards compatibility, if this section is missing, the full length of the short description will be used, and
18+
Markdown parsed.
19+
20+
A few notes about the sections above:
21+
22+
* "Contributors" is a comma separated list of wp.org/wp-plugins.org usernames
23+
* "Tags" is a comma separated list of tags that apply to the plugin
24+
* "Requires at least" is the lowest version that the plugin will work on
25+
* "Tested up to" is the highest version that you've *successfully used to test the plugin*. Note that it might work on
26+
higher versions... this is just the highest one you've verified.
27+
* Stable tag should indicate the Subversion "tag" of the latest stable version, or "trunk," if you use `/trunk/` for
28+
stable.
29+
30+
Note that the `readme.txt` of the stable tag is the one that is considered the defining one for the plugin, so
31+
if the `/trunk/readme.txt` file says that the stable tag is `4.3`, then it is `/tags/4.3/readme.txt` that'll be used
32+
for displaying information about the plugin. In this situation, the only thing considered from the trunk `readme.txt`
33+
is the stable tag pointer. Thus, if you develop in trunk, you can update the trunk `readme.txt` to reflect changes in
34+
your in-development version, without having that information incorrectly disclosed about the current stable version
35+
that lacks those changes -- as long as the trunk's `readme.txt` points to the correct stable tag.
36+
37+
If no stable tag is provided, it is assumed that trunk is stable, but you should specify "trunk" if that's where
38+
you put the stable version, in order to eliminate any doubt.
39+
40+
== Installation ==
41+
42+
This section describes how to install the plugin and get it working.
43+
44+
e.g.
45+
46+
1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
47+
1. Activate the plugin through the 'Plugins' menu in WordPress
48+
1. Place `<?php do_action('plugin_name_hook'); ?>` in your templates
49+
50+
== Frequently Asked Questions ==
51+
52+
= A question that someone might have =
53+
54+
An answer to that question.
55+
56+
= What about foo bar? =
57+
58+
Answer to foo bar dilemma.
59+
60+
== Screenshots ==
61+
62+
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from
63+
the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets
64+
directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`
65+
(or jpg, jpeg, gif).
66+
2. This is the second screen shot
67+
68+
== Changelog ==
69+
70+
= 1.0 =
71+
* A change since the previous version.
72+
* Another change.
73+
74+
= 0.5 =
75+
* List versions from most recent at top to oldest at bottom.
76+
77+
== Upgrade Notice ==
78+
79+
= 1.0 =
80+
Upgrade notices describe the reason a user should upgrade. No more than 300 characters.
81+
82+
= 0.5 =
83+
This version fixes a security related bug. Upgrade immediately.
84+
85+
== Arbitrary section ==
86+
87+
You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated
88+
plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or
89+
"installation." Arbitrary sections will be shown below the built-in sections outlined above.
90+
91+
== A brief Markdown Example ==
92+
93+
Ordered list:
94+
95+
1. Some feature
96+
1. Another feature
97+
1. Something else about the plugin
98+
99+
Unordered list:
100+
101+
* something
102+
* something else
103+
* third thing
104+
105+
Here's a link to [WordPress](http://wordpress.org/ "Your favorite software") and one to [Markdown's Syntax Documentation][markdown syntax].
106+
Titles are optional, naturally.
107+
108+
[markdown syntax]: http://daringfireball.net/projects/markdown/syntax
109+
"Markdown is what the parser uses to process much of the readme file"
110+
111+
Markdown uses email style notation for blockquotes and I've been told:
112+
> Asterisks for *emphasis*. Double it up for **strong**.
113+
114+
`<?php code(); // goes in backticks ?>`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

framework.php ReduxFramework/framework.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ public function __construct( $sections = array(), $args = array(), $extra_tabs =
126126
}
127127
}
128128

129-
130-
131129
$this->sections = $sections;
132130
$this->extra_tabs = $extra_tabs;
133131

@@ -235,15 +233,20 @@ function get_options() {
235233
if ( !empty( $this->defaults ) ) {
236234
$defaults = $this->defaults;
237235
}
236+
238237
if ( $this->args['database'] === "transient" ) {
239238
$result = get_transient( $this->args['opt_name'] . '-transient' );
240239
} else if ($this->args['database'] === "theme_mods" ) {
241240
$result = get_theme_mod( $this->args['opt_name'] . '-mods' );
242241
} else if ( $this->args['database'] === 'theme_mods_expanded' ) {
243242
$result = get_theme_mods();
244243
} else {
245-
$result = get_option( $this->args['opt_name'], $defaults );
244+
$result = get_option( $this->args['opt_name']);
246245
}
246+
if ( empty( $result ) && !empty( $defaults ) ) {
247+
$results = $defaults;
248+
$this->set_options($results);
249+
}
247250
// Set a global variable by the global_variable agument.
248251
if ( $this->args['global_variable'] ) {
249252
$options = $this->args['global_variable'];
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

inc/fields/links_color/field_links_color.php ReduxFramework/inc/fields/link_color/field_link_color.php

+7-6
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
if( !defined( 'ABSPATH' ) ) exit;
2626

2727
// Don't duplicate me!
28-
if( !class_exists( 'ReduxFramework_links_color' ) ) {
28+
if( !class_exists( 'ReduxFramework_link_color' ) ) {
2929

3030
/**
31-
* Main ReduxFramework_links_color class
31+
* Main ReduxFramework_link_color class
3232
*
3333
* @since 1.0.0
3434
*/
35-
class ReduxFramework_links_color extends ReduxFramework {
35+
class ReduxFramework_link_color extends ReduxFramework {
3636

3737
/**
3838
* Field Constructor.
@@ -77,24 +77,25 @@ public function render() {
7777
);
7878

7979
$this->value = wp_parse_args( $this->value, $defaults );
80+
$this->field['default'] = wp_parse_args( $this->field['default'], $defaults );
8081

8182
echo '<div class="redux-color-gradient-container" id="' . $this->field['id'] . '">';
8283

8384
if ($this->field['show_regular'] === true):
8485

85-
echo '<strong>' . __( 'Regular State ', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-regular" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][regular]" value="'.$this->value['regular'].'" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['regular'] . '" />&nbsp;&nbsp;&nbsp;&nbsp;';
86+
echo '<strong>' . __( 'Regular', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-regular" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][regular]" value="'.$this->value['regular'].'" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['regular'] . '" />&nbsp;&nbsp;&nbsp;&nbsp;';
8687

8788
endif;
8889

8990
if ($this->field['show_hover'] === true):
9091

91-
echo '<strong>' . __( 'Hover State ', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-hover" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][hover]" value="' . $this->value['hover'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['hover'] . '" />&nbsp;&nbsp;&nbsp;&nbsp;';
92+
echo '<strong>' . __( 'Hover', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-hover" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][hover]" value="' . $this->value['hover'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['hover'] . '" />&nbsp;&nbsp;&nbsp;&nbsp;';
9293

9394
endif;
9495

9596
if ($this->field['show_active'] === true):
9697

97-
echo '<strong>' . __( 'Active State ', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-active" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][active]" value="' . $this->value['active'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['active'] . '" />';
98+
echo '<strong>' . __( 'Active', 'redux-framework' ) . '</strong>&nbsp;<input id="' . $this->field['id'] . '-active" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][active]" value="' . $this->value['active'] . '" class="redux-color redux-color-init ' . $this->field['class'] . '" type="text" data-default-color="' . $this->field['default']['active'] . '" />';
9899

99100
endif;
100101

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)